-
Notifications
You must be signed in to change notification settings - Fork 152
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
Error on converting a custom yolov5s to yolort #141
Comments
Hi @erfaneshratifar , Thanks for reporting this problem. Currently we recommend using https://github.com/zhiqwang/yolov5-rt-stack/blob/master/notebooks/how-to-align-with-ultralytics-yolov5.ipynb to export the If this notebook can't resolve this problem, do you mind sending us your customized yolov5 model and a test image via Cloud Drive or Email, so that we could reproduce this bug? |
@erfaneshratifar which version of yolov5 you use? For me, I faced the same problem when I use V5.0 of yolov5. I think this repo currently only supports V4.0 of yolov5. @zhiqwang Do you have a plan to extend the support to V5.0 of yolov5? |
Hi @Jelly123456 , Thanks for pointing out the problem here. The main structure of v4.0 and v5.0 in YOLOv5 looks very similar, I guess there are some minor changes in their interface. We will adjust the current export interface to adapt to the v5.0 release (or master) of YOLOv5 at the end of this month. And any contributions are welcome here! Pitch: |
Hi all here, We introduce a new interface to resolve this issue in #167, and now we recommend that you load the checkpoint trained with ultralytics/yolov5 in the following way: from yolort.models import yolov5s
# the following 'yolov5s.pt' is downloaded from https://github.com/ultralytics/yolov5/releases/download/v4.0/yolov5s.pt
ckpt_path_from_ultralytics = 'yolov5s.pt'
model = yolov5s(score_thresh=0.25)
model.load_from_yolov5(ckpt_path_from_ultralytics)
model.eval()
img_path = 'test/assets/bus.jpg'
results = model.predict(img_path) And as such we are closing this issue, and fell free to file a new issue if you are having any questions in using it. |
I'm getting this error when converting a customized yolov5 to yolort:
The text was updated successfully, but these errors were encountered: