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

Question on labels plot #2265

Closed
pvti opened this issue Feb 22, 2021 · 8 comments
Closed

Question on labels plot #2265

pvti opened this issue Feb 22, 2021 · 8 comments
Labels
question Further information is requested

Comments

@pvti
Copy link

pvti commented Feb 22, 2021

❔Question

Hi, this is the label.png extracted from my custom training.
image

I have 2 questions:

  1. What is the meaning of the top-right subplot? I think that may be the ground-truth bouding box of N instances. Is that right?
  2. In the top-left subplot, how to modify class label from "0, 1, 2" to "person, car, dog"? please point out the related code, I guess it shoud relate to utils/plots.py

Many thanks for your help!

@pvti pvti added the question Further information is requested label Feb 22, 2021
@glenn-jocher
Copy link
Member

glenn-jocher commented Feb 22, 2021

@pvtien96 the top left plot is class frequency. This plot displays class indices, not the class names. You should supply a names array for your custom dataset yaml file as the Train Custom Data Tutorial describes below. The top right plot is a snapshot of your labels in normalized height and width space.

Tutorials

@pvti
Copy link
Author

pvti commented Feb 22, 2021

@glenn-jocher thanks for your explanation.
With top left plot, I supplied class names as in the tutorial.
However, as you mentioned, this subplot displays class indices by ax[0].hist(c, bins=np.linspace(0, nc, nc + 1) - 0.5, rwidth=0.8)
I tried ax[0].set_xticks(['person', 'car', 'dog']) but unfortunately hist doesn't work with set_xticks.

@glenn-jocher
Copy link
Member

@pvtien96 you can customize this plot to suit your needs here. We don't assign label names to the axis as this doesn't scale to larger datasets like COCO.

yolov5/utils/plots.py

Lines 272 to 273 in 095d2c1

def plot_labels(labels, save_dir=Path(''), loggers=None):
# plot dataset labels

@pvti
Copy link
Author

pvti commented Feb 22, 2021

Thank you very much @glenn-jocher .

@pvti pvti closed this as completed Feb 22, 2021
@pvti
Copy link
Author

pvti commented Apr 20, 2021

Just realize that the label plot now has name of classes on it. So happy :)
image

@glenn-jocher
Copy link
Member

@pvtien96 yes we added this a while ago to improve the plots! Thanks for the feedback. If there are other feature requests or issues you encounter please let us know!

@pvti
Copy link
Author

pvti commented Apr 20, 2021

@glenn-jocher I'm wondering whether this repo should be released as an official paper. Your work contains a bunch of technique can be considered as contributions for the paper. Also, in many object detection competitions this yolov5 dominates the leader board. It is also used widely in other stuffs. One more things, I wrote in some papers that I used this repo and I cited this from your zenodo. But it'll be better if we have an arxiv/dbpl citation.
Should I open a feature request, haha?

@glenn-jocher
Copy link
Member

@pvtien96 thanks for the suggestion! The paper is somewhere on our quite-long TODO list at the moment. We are working on bringing on some more maintainers for the repository and for expanding YOLOv5 training and deployment options as well, so hopefully soon I'll have some more free time to dedicate to tasks like the paper that I agree is quite overdue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants