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

Add features to log precision and recall metric for each class. (detection task) #579

Merged
merged 14 commits into from
Nov 26, 2024

Conversation

hglee98
Copy link
Contributor

@hglee98 hglee98 commented Nov 1, 2024

Description

This PR aims to present features to log detection precision and recall metric for each and total class.

example:

+----------------+--------------+----------+----------+------------+-------------+----------+
| Class number   | Class name   | mAP50    | mAP75    | mAP50_95   | Precision   | Recall   |
+================+==============+==========+==========+============+=============+==========+
| 0              | car          | 0.915827 | 0.770286 | 0.634498   | 0.915033    | 0.854962 |
+----------------+--------------+----------+----------+------------+-------------+----------+
| 1              | bus          | 0.74875  | 0.74875  | 0.673875   | 0.75        | 0.6      |
+----------------+--------------+----------+----------+------------+-------------+----------+
| 2              | truck        | 0.889912 | 0.765798 | 0.618583   | 0.736842    | 1        |
+----------------+--------------+----------+----------+------------+-------------+----------+
| 3              | person       | 0.910091 | 0.550151 | 0.528495   | 0.895652    | 0.855956 |
+----------------+--------------+----------+----------+------------+-------------+----------+
| 4              | bicycle      | 0        | 0        | 0          | 0           | 0        |
+----------------+--------------+----------+----------+------------+-------------+----------+
| 5              | motorcycle   | 0.75     | 0.75     | 0.6        | 1           | 0.5      |
+----------------+--------------+----------+----------+------------+-------------+----------+
| -              | Mean         | 0.70243  | 0.597498 | 0.509242   | 0.716254    | 0.635153 |
+----------------+--------------+----------+----------+------------+-------------+----------+

Closes: #578

We recommend to link at least one existing issue for PR. Before your create a PR, please check if there is an issue for this change.

Change(s)

  • Implement detection precision and recall metric
  • Add precision and recall metric as a default metric for the object detection task.

Code Formatting

If you PR to either master or dev branch, you should follow the code linting process. Please check your code with lint_check.sh in ./scripts directory.
For more information, please read the contribution guide in CONTRIBUTING.md.

Changelog

If your PR is granted to dev branch, codeowner will add a brief summary of the change to the Upcoming Release section of the CHANGELOG.md file including a link to the PR (formatted in markdown) and a link to your github profile.

For example,

- Added a new feature by `@myusername` in [PR 2023](https://github.com/Nota-NetsPresso/netspresso-trainer/pull/2023)

Please enable Allow edits and access to secrets by maintainers so that our maintainers can update the CHANGELOG.md.

@hglee98 hglee98 requested a review from illian01 as a code owner November 1, 2024 05:20
Copy link
Collaborator

@illian01 illian01 left a comment

Choose a reason for hiding this comment

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

Thank you for adding new metrics of detection task.
I have some code review, please check detailed comments.

config/data/local/debug.yaml Outdated Show resolved Hide resolved
src/netspresso_trainer/metrics/detection/metric.py Outdated Show resolved Hide resolved
src/netspresso_trainer/metrics/detection/metric.py Outdated Show resolved Hide resolved
@illian01 illian01 added the enhancement New feature or request label Nov 12, 2024
@hglee98 hglee98 requested a review from illian01 November 14, 2024 06:56
Copy link
Collaborator

@illian01 illian01 left a comment

Choose a reason for hiding this comment

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

LGTM!

@illian01 illian01 merged commit 95315b2 into Nota-NetsPresso:dev Nov 26, 2024
2 checks passed
@hglee98 hglee98 deleted the 578-precision-recall branch December 6, 2024 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Sprint] Add features to log precision and recall metric for each class. (detection task)
2 participants