Skip to content

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant