yolov10 icon indicating copy to clipboard operation
yolov10 copied to clipboard

📝 Add Hugging Face Demo and Model Pages to README

Open kadirnar opened this issue 1 year ago • 4 comments

HuggingFace Demo(Zero A100): https://huggingface.co/spaces/kadirnar/Yolov10

HuggingFace Model Page: https://huggingface.co/kadirnar/Yolov10

Colab Demo: https://colab.research.google.com/github/roboflow-ai/notebooks/blob/main/notebooks/train-yolov10-object-detection-on-custom-dataset.ipynb Thanks @SkalskiP

kadirnar avatar May 24 '24 20:05 kadirnar

Thank you very much! We have updated README.

jameslahm avatar May 25 '24 00:05 jameslahm

@kadirnar Thanks for your great efforts! We found that the prediction results are not the same in our local environment and the HuggingFace demo. After investigation, we found that this is caused by the incorrect input format. As shown in the document for prediction: https://github.com/THU-MIG/yolov10/blob/main/docs/en/modes/predict.md#inference-sources image

For the numpy.array input, the model expects the input with the format of BGR. However, the gr.Image(type='numpy') component will output the numpy.array with the format of RGB, which results in the incorrect predictions. Replacing gr.Image(type="numpy", label="Image") with gr.Image(type="pil", label="Image") can address this issue by passing the correct PIL format with RGB. Could you please fix this issue in the HuggingFace demo? We'd appreciate it very much. Thank you!

jameslahm avatar May 29 '24 11:05 jameslahm

I fixed it. Thank you for the detailed explanation ❤️

kadirnar avatar May 29 '24 15:05 kadirnar

@kadirnar Thanks for your efforts! But you seem to have changed it in the wrong place. Could you please replace gr.Image(type="numpy", label="Image") in this line https://huggingface.co/spaces/kadirnar/Yolov10/blob/main/app.py#L52 with gr.Image(type="pil", label="Image")? Thanks a lot!

I fixed it. Thank you for the detailed explanation ❤️

jameslahm avatar May 30 '24 01:05 jameslahm

Sorry😅 I fixed it.

kadirnar avatar May 30 '24 11:05 kadirnar

@kadirnar Thanks a lot for your great help! It works now! ❤️

jameslahm avatar May 30 '24 11:05 jameslahm