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

Improve YOLO test speed #603

Merged
merged 37 commits into from
May 31, 2023
Merged

Improve YOLO test speed #603

merged 37 commits into from
May 31, 2023

Conversation

franz101
Copy link
Contributor

Instead of training on coco128 we create a custom dataset and we only have 4 samples

@franz101 franz101 marked this pull request as ready for review May 19, 2023 17:51
@franz101 franz101 requested a review from a team as a code owner May 19, 2023 17:51
Copy link
Contributor

@Ben-Epstein Ben-Epstein left a comment

Choose a reason for hiding this comment

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

I'm not sure what exactly is happening in this PR exactly. Why are we changing so much about the Object Detection logger?

Also seeing a lot of print statements

@franz101
Copy link
Contributor Author

@Ben-Epstein removed the print statements. essentially the model logger was failing if there were no predictions for the batch at all. therefore we need to fallback to empty arrays and make sure the shapes are equal. remove the print statements

@codecov-commenter
Copy link

codecov-commenter commented May 22, 2023

Codecov Report

Merging #603 (0bae30b) into main (cfc052e) will decrease coverage by 0.19%.
The diff coverage is 79.54%.

@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
- Coverage   84.21%   84.02%   -0.19%     
==========================================
  Files         165      165              
  Lines       13005    13036      +31     
==========================================
+ Hits        10952    10954       +2     
- Misses       2053     2082      +29     
Impacted Files Coverage Δ
dataquality/dqyolo.py 0.00% <0.00%> (ø)
...taquality/loggers/model_logger/object_detection.py 87.69% <76.92%> (-3.38%) ⬇️
dataquality/utils/od.py 33.33% <77.77%> (+13.33%) ⬆️
dataquality/utils/ultralytics.py 55.92% <78.57%> (-10.27%) ⬇️
tests/integrations/ultralytics/test_cv_yolo.py 98.61% <100.00%> (+0.01%) ⬆️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

prob = np.zeros(gold_prob_shape)
if len(pred_prob_arrays) > 0:
prob = np.concatenate([pred_prob_arrays, np.zeros(gold_prob_shape)])
# prob = np.concatenate([pred_prob_arrays, np.zeros(gold_prob_shape)])
Copy link
Contributor

Choose a reason for hiding this comment

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

want to cleanup the older np.concat ?

Copy link
Contributor

@bogdan-galileo bogdan-galileo left a comment

Choose a reason for hiding this comment

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

prob = np.zeros(gold_prob_shape)
if len(pred_prob_arrays) > 0:
prob = np.concatenate([pred_prob_arrays, np.zeros(gold_prob_shape)])
# prob = np.concatenate([pred_prob_arrays, np.zeros(gold_prob_shape)])
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# prob = np.concatenate([pred_prob_arrays, np.zeros(gold_prob_shape)])
# prob = np.concatenate([pred_prob_arrays, np.zeros(gold_prob_shape)])

@franz101 franz101 enabled auto-merge (squash) May 31, 2023 04:21
@franz101 franz101 merged commit 7683b39 into main May 31, 2023
@franz101 franz101 deleted the fixes/dq_yolo_speed branch May 31, 2023 04:32
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.

4 participants