-
Notifications
You must be signed in to change notification settings - Fork 11
Update objdetect benchmark formatting #7
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
Update objdetect benchmark formatting #7
Conversation
| self.col_offset:self.col_offset + image.shape[1]] = image | ||
| self.col_offset:self.col_offset + image.shape[1]] = image |
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.
tab refactoring
| 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 |
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.
move to @staticmethod
| plt.rcParams["figure.subplot.right"] = 0.99 | ||
|
|
||
|
|
||
| def print_category_frame(obj_type, category, statistics, accuracy, path): |
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.
bad function name. Not clear what it does.
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.
renamed to get_and_print_category_statistic
| 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 |
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.
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.
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
asmorkalov
left a comment
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.
👍
Here is an example of the program output:
