Single label detection
jyo94 opened this issue · comments
In my annotation file, I have two labels (cassava and weed). I'm performing 2 actions(filtering and renaming of the classes) and proceeding with a single label for model training.
Reasons for the above 2 steps:
- Filtering one label because I don't know how to perform multi label
- Renaming the cropname (cassava) as Tree because it throwed keyerror if kept as such
All other steps - training, evaluation and prediction are done as per the documentation. Kindly refer the file for more details.
Issue:
- All objects are detected (though filtered out for one). If it is misclassified, it is fine but here it is not the case.
- All are detected as tree and not as cassava
Predicted Image:
sample_output.zip
Nice work on this issue @jyo94!
- All objects are detected (though filtered out for one). If it is misclassified, it is fine but here it is not the case.
Distinguishing between these two will be a bit tricky without the multi-class setup since they are both plants that appear somewhat similar relative to the background. It would probably require a fair bit of training data to overcome this. There are some other approaches, but let's start with seeing if we can get your multi-class setup up and running.
- All are detected as tree and not as cassava
You can change the label name for a single class model by setting the label_dict
argument when creating the model
m = main.deepforest(label_dict={"cassava":0})
There's an example in the docs for birds.