Trying to convert trained(.pt file) Yolo model on tools.luxonis.com
Hi @Fakhrullo,
I'll look into it and let you know when I find something. In the meantime, could you please share with us what export arguments (# of shaves, RVC2 or RVC3, etc.) you used?
Best,
Jan
- Edited
Hi @Fakhrullo
thanks for your reply. I tried to load the weights (best.pt) that you shared with us, but I was unable to load them using:
import torch
torch.load("best.pt")
It returned the following error:
KeyError: "filename 'storages' not found"
It seems like the file is corrupted. Can you please try it as well and ensure it's not corrupted?
Best
Jan
Please be aware that you need to download the .pt file, somehow google drive is opening .pt file like a zip file
Here's the image, after opening the drive link, just press the download button without opening best file
Thanks. I'll look into it and get back to you as soon as I discover something.
Best,
Jan
I found out that your model is convertible using the YoloV8
option in tools. Here's the exported model. Can you please verify that it works? I tried to run the model on an OAK device, and it ran without an error, but I don't know what the model is supposed to detect.
Could you please also share the details about how you train the model? It's very interesting that to load the weights, the package ultralytics
(which is used for YoloV8) is required.
Best
Jan
Hi JanCuhel
I'm very new in this sphere, so I found some tutorials to train Yolov8 and I thought if I change the model it would just train the other models as well (in my case yolov6n) here's the code I used to train the model:
# Load a model
from ultralytics import YOLO
model = YOLO('yolov6n.yaml') # load a
pretrained model (recommended for training)
# Train the model
results = model.train(data='/content/Yolo/dataset/data.yaml', epochs=10, imgsz=640)
- Best Answerset by jakaskerl
Ah, I see. Now, it makes sense. I saw in the ultralytics documentation that they support YoloV6 as well. So you can keep using the code you have and (for now) use the YoloV8
export option in the tools when converting the model. Another option would be to use YoloV6's training script. We have prepared a tutorial for that. You can also find more information in the YoloV6's repository. If you would choose this, then you could use the YoloV6
export option in the tools.
Best,
Jan
Glad to hear that I was able to help you! Thank you, you too!
Best,
Jan