-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes the main.predict_file for numeric labels #860
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@naxatra2 Thank you for your contribution! I'm not sure if this part is necessary in the tests (test_predict_tile_with_crop_model_empty
). Since the changes are focused on predict_file
, I was expecting the test updates to primarily be in test_[predict]*[file]
.
tests/test_main.py
Outdated
crop_model = model.CropModel() | ||
|
||
# Configure the label dictionary | ||
m.label_dict = {"Tree": 0, "Bush": 1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@naxatra2 Why do we have this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I accidentally committed that part, earlier I was using a different logic where I used this. I should remove this
I though that I did changes on |
removed an unnecessary dictionary (label_dict)
Fixes #705
I have updated the cropmodel_label in
main.predict_file
. Earlier it was showing 0 or 1, now it better matches the result["label"] from the detection as being a string.The testcases are also running.