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

Fix #961: Remove root_dir args and visualization from evaluate_image_boxes and evaluate_boxes function #964

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

Conversation

Samia35-2973
Copy link
Contributor

This addresses issue #961 by making the following changes:

  • Removed the root_dir argument from both the evaluate_image_boxes and evaluate_boxes functions as it was unnecessary.
  • Removed the visualization component in the evaluate_image_boxes function

@henrykironde
Copy link
Contributor

Under review: ff66fac

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.

Thanks @Samia35-2973 for getting to work on this issue. I expected some changes in the tests too.

@Samia35-2973
Copy link
Contributor Author

Thank you for the feedback @henrykironde. I am working on the test cases.

@Samia35-2973
Copy link
Contributor Author

  • I’ve updated evaluate.py by removing the root_dir arguments, as I had previously missed a few instances.
  • Additionally, I modified test_evaluate.py as requested, removing root_dir from the calls to evaluate_image_boxes() and evaluate_boxes().
  • In the test_evaluate_boxes_save_images method, I also removed the assertion checking for saved images, since evaluate_boxes() no longer saves comparison files.

All tests pass locally after these updates. Please let me know if anything needs further clarification or if there are any additional changes you'd like me to make.

savedir=tmpdir)
assert all([os.path.exists("{}/{}".format(tmpdir, x)) for x in ground_truth.image_path])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing this assert?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the evaluate.py file, the evaluate_boxes() only saves images if the root_dir is provided to locate the original image files. As I removed the root_dir from this function and the evaluate_image_boxes() function, Image.open() cannot load the original image, so no files are saved. The assertion checked for images which were created only if root_dir was provided. As a result, the test was failing after the removal of root_dir.

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.

2 participants