-
Notifications
You must be signed in to change notification settings - Fork 692
Added support for ingestion yolo and tweaked git_ignore to allow yolo #2099
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
Conversation
…er with yolo in the name
|
Ivo Stranic seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov ReportBase: 85.21% // Head: 85.34% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2099 +/- ##
==========================================
+ Coverage 85.21% 85.34% +0.13%
==========================================
Files 283 287 +4
Lines 30645 30947 +302
==========================================
+ Hits 26113 26413 +300
- Misses 4532 4534 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…erly to retrieve the username. Tweaked yolo implementation.
…orting in list. Added reporting to ingest_dataframe.
| tensor_meta["images"].is_link, | ||
| self.image_creds_key, | ||
| ), | ||
| self.label_params["name"]: yolo_labels.astype( |
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.
In this case, the astype conversion results in coping of the array, although its small.
Can be solved by passing the type from the tensor upfront both to np.zeros(4, dtype=...) and the read_yolo_coordinates, then to the array creation like np.array(..., dtype=dtype).
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.
Hey @ProgerDav Not sure I 100% get it. I want to cast at the end using astype, because I don't want to pass the dtype to read_yolo_coordinates. I want to assume that I don't know the dtype returned by read_yolo_coordinates, and then cast at the end. I see how I could populate the zeros with the correct dtype in advance, but I don't think I can do that with the output of read_yolo_coordinates, no?
| self.coordinates_params["name"] = coordinates_name | ||
|
|
||
| def _initialize_params(self, image_params, label_params, coordinates_params): | ||
| image_params_updated = DEFAULT_IMAGE_TENSOR_PARAMS.copy() |
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.
These parts may be simplified like self.image_params = {**DEFAULT_IMAGE_TENSOR_PARAMS, **image_params}. Effect if the same, only items present in the second dictionary will be overwritten over the default ones.
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.
fixed
|
|
||
| if coordinates.size % 2 != 0: | ||
| raise IngestionError( | ||
| f"Error ih annotation {file_name}. Polygons must have an even number of points." |
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.
Typo
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.
Fixed.
🚀 🚀 Pull Request
Checklist:
coverage-rateupChanges