Replies: 2 comments
-
@mnj see YOLOv5 PyTorch Hub inference tutorial for python inference: YOLOv5 Tutorials
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Did you ever sort this out? Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
Read the getting started guides etc, and got to creating a custom dataset to detect some specific object in a video (mp4), I cloned the repo, found lots of images, annotated them in yolov5 format, and used the train.py script and got a pretty good weight? file (the one in \yolov5\runs\train\yolov5s_resultsxxx\weights\best.pt), that was pretty accurate when using detect.py on a mp4 file.
I looked at countless blogs, and videos, everyone just shows how to use detect.py, not actual custom python code that uses the files generated by train.py, I even tried to dissect the detect.py file, but it's really a terrible mess to understand for a torch beginner, does anyone know an example of how to load that best.pt file that was created from train.py, basically I want to run the detection on live video, frame by frame, so can't use detect.py, the program needs to work on the bounding box data that is detected, but there doesn't seem to be any examples of actual use, outside the simple train.py -> detect.py, usually done in codelab, which isn't practical to real world use, really confused how this is supposed to work.
I read the parts about saving/loading state etc, but isn't that what train.py already did for the model, when i try to load best.py that was generated from train.py it just complains it's not a valid file to load (despite it working fine with detect.py).
Hope someone can point me in the right direction, on how to use the weights/model that was generated from the yolo5 stuff, the docs just make no sense to me, on how to move that trained data into a real world standalone script/app, outside the provided scripts/codelabs.
Beta Was this translation helpful? Give feedback.
All reactions