Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

added utility to plot cmc curve #589

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ideepankarsharma2003
Copy link

Added Utility to Plot CMC Curve

Summary

This PR introduces a utility function to plot the Cumulative Matching Characteristics (CMC) curve and integrates it into the evaluation pipeline.

Changes

  • Added plot_cmc() in torchreid/utils/tools.py to generate and save the CMC curve.
  • Modified torchreid/engine/engine.py to call plot_cmc() after computing CMC values.
  • Ensured the plot is saved at save_dir/cmc_curve.png.

Implementation Details

  • plot_cmc() takes CMC values as input and plots the curve using Matplotlib.
  • The function supports plotting up to a specified max_rank (default: 50).
  • Saves the curve as an image to the provided save_path.

Example Usage

After evaluation, the CMC curve will be automatically generated and saved.

Testing

  • Verified that the function correctly plots the curve with sample CMC data.
  • Checked that the image is saved properly.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant