PyQt5-YOLOv5
PyQt5-YOLOv5 copied to clipboard
How to train model on custom dataset
Please provide step by step tutorial how to train model.
This repository is just an interface implementation. If you want to train your dataset, you can refer to https://github.com/ultralytics/yolov5
You are using your python code well. Thank you. I have two questions. When I first created a custom model using yolo5x, entered the model, and tried to detect the image, an error occurred. Do you have any comments on this part?
I want to collaborate and develop the data visualization part by storing the contents found in the second detection as a DB. What do you think?
You are using your python code well. Thank you. I have two questions. When I first created a custom model using yolo5x, entered the model, and tried to detect the image, an error occurred. Do you have any comments on this part?
I want to collaborate and develop the data visualization part by storing the contents found in the second detection as a DB. What do you think?
Please post specific error you have encountered.
When using a custom dataset, the following message continuously occurs. I've been editing your source code for a long time, is the YAML file the problem? Is it a path issue?
--------------------------------error message --------------------------------------------------------------- $ python yolo_win.py C:\Users\shkang21\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:2157.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "C:\Users\shkang21\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\autograd\grad_mode.py", line 28, in decorate_context return func(*args, **kwargs) File "C:\yolov5\pyqt5\yolo_win.py", line 100, in run pred = model(img, augment=augment)[0] File "C:\Users\shkang21\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "C:\yolov5\pyqt5\models\yolo.py", line 122, in forward return self.forward_once(x, profile, visualize) # single-scale inference, train File "C:\yolov5\pyqt5\models\yolo.py", line 153, in forward_once x = m(x) # run File "C:\Users\shkang21\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "C:\yolov5\pyqt5\models\yolo.py", line 63, in forward y[..., 2:4] = (y[..., 2:4] * 2) ** 2 * self.anchor_grid[i] # wh RuntimeError: The size of tensor a (80) must match the size of tensor b (84) at non-singleton dimension 3
Have you solved this problem? I also encountered this problem.
RuntimeError: The size of tensor a (80) must match the size of tensor b (84) at non-singleton dimension 3
Can you tell me how you solved it?