Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

naxatra2
Copy link
Contributor

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.

Copy link
Contributor

@henrykironde henrykironde left a 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].

crop_model = model.CropModel()

# Configure the label dictionary
m.label_dict = {"Tree": 0, "Bush": 1}
Copy link
Contributor

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?

Copy link
Contributor Author

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

@henrykironde henrykironde added the Awaiting author contribution Waiting on the issue author to do something before proceeding label Jan 7, 2025
@naxatra2
Copy link
Contributor Author

naxatra2 commented Jan 7, 2025

I though that I did changes on main.py and not on predict.py that's why I added that test in the test_main.py file. What changes should I do to improve the new testcase for this. I didn't get it ?

@github-actions github-actions bot removed the Awaiting author contribution Waiting on the issue author to do something before proceeding label Jan 7, 2025
removed an unnecessary dictionary (label_dict)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CropModel should return labels not numeric values.
2 participants