I am new to pytorch and Deep learning. I am trying to do image segmentation. But , I am stuck at how to label training set images.

Can anyone please help me ?

This is one of my training image

Crop and weed classification

I have two kinds of plants here - one is weed and another one is a good crop. I need to label them.

Can anyone tell me how can I do this ?


2 Answers 2


If you have the labeled training data with you then, you will have to label each pixel in the training set, compute the loss and backpropagate it. The link given below should help.

Suprevised Image Segmentation

  • 1
    $\begingroup$ I am going to use deep neural network model ResNet , do I still need to label ? And one more thing : I do not have any labeled training data $\endgroup$
    – DukeLover
    Apr 7, 2018 at 18:26
  • $\begingroup$ If you are doing supervised learning, you need to have labeled data and the network you use is irrelevant in this decision. If you do not have labeled data, you should consider unsupervised image segmentation given here. arxiv.org/abs/1711.08506 $\endgroup$ Apr 9, 2018 at 8:42

If you need to make complex annotations of images try to use labelstud.io.

Label studio


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.