Update objdetect benchmark formatting#7
Merged
asmorkalov merged 20 commits intoopencv:developfrom Oct 18, 2023
Merged
Conversation
AleksandrPanov
commented
Sep 28, 2023
Comment on lines
-195
to
+196
| self.col_offset:self.col_offset + image.shape[1]] = image | ||
| self.col_offset:self.col_offset + image.shape[1]] = image |
Contributor
Author
There was a problem hiding this comment.
tab refactoring
AleksandrPanov
commented
Sep 28, 2023
AleksandrPanov
commented
Sep 28, 2023
AleksandrPanov
commented
Sep 28, 2023
AleksandrPanov
commented
Sep 28, 2023
Comment on lines
-333
to
-354
| def check_aruco(synthetic_aruco, marker_corners, marker_ids, accuracy, type_dist): | ||
| gold = {} | ||
| gold_corners, gold_ids = synthetic_aruco.aruco_corners.reshape(-1, 4, 2), \ | ||
| synthetic_aruco.aruco_ids | ||
| for marker_id, marker in zip(gold_ids, gold_corners): | ||
| gold[int(marker_id)] = marker | ||
| dist = 0. | ||
| detected_count = 0 | ||
| total_count = len(gold_ids) | ||
| detected = {} | ||
| if len(marker_ids) > 0: | ||
| for marker_id, marker in zip(marker_ids, marker_corners): | ||
| detected[int(marker_id)] = marker.reshape(4, 2) | ||
| for gold_id in gold_ids: | ||
| gold_corner = gold_corners[int(gold_id)] | ||
| if int(gold_id) in detected: | ||
| corner = detected[int(gold_id)] | ||
| loc_dist = get_norm(gold_corner, corner, type_dist) | ||
| if loc_dist < accuracy: | ||
| dist += loc_dist | ||
| detected_count += 1 | ||
| return detected_count, total_count, dist |
Contributor
Author
There was a problem hiding this comment.
move to @staticmethod
6 tasks
asmorkalov
reviewed
Oct 16, 2023
| plt.rcParams["figure.subplot.right"] = 0.99 | ||
|
|
||
|
|
||
| def print_category_frame(obj_type, category, statistics, accuracy, path): |
Contributor
There was a problem hiding this comment.
bad function name. Not clear what it does.
Contributor
Author
There was a problem hiding this comment.
renamed to get_and_print_category_statistic
Comment on lines
+1
to
+18
| contourpy==1.1.1 | ||
| cycler==0.12.0 | ||
| fonttools==4.43.0 | ||
| iteration-utilities==0.11.0 | ||
| kiwisolver==1.4.5 | ||
| matplotlib==3.8.0 | ||
| matplotlib-venn==0.11.9 | ||
| numpy==1.24.2 | ||
| opencv-python==4.8.1.78 | ||
| packaging==23.2 | ||
| pandas==2.1.1 | ||
| Pillow==9.4.0 | ||
| pyparsing==3.1.1 | ||
| python-dateutil==2.8.2 | ||
| pytz==2023.3.post1 | ||
| scipy==1.11.3 | ||
| six==1.16.0 | ||
| tzdata==2023.3 |
Contributor
There was a problem hiding this comment.
The dependencies are to strict and some of them redundant. I propose to exclude numpy and opencv-python as the test version may differ from the requirements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here is an example of the program output:
