Closed nguyenduylinhqbu closed 9 months ago
Hi, You just need to do two simple steps:
1: Place the model (Your custom model .pt file) inside the weights folder
2: Add the name of the weight pt file inside settings.py
# ML Model config
MODEL_DIR = ROOT / 'weights'
# DETECTION_MODEL = MODEL_DIR / 'yolov8n.pt' # Comment out this line and
# Place your custom model pt file name here
DETECTION_MODEL = MODEL_DIR / 'my_detection_model.pt'
Dear sir @CodingMantras, I followed your guide but I faced this error. Please let me know how to fix it. Thank you.
ERROR ❌️ weights/best_IWIS23.pt appears to be an Ultralytics YOLOv5 model originally trained with https://github.com/ultralytics/yolov5. This model is NOT forwards compatible with YOLOv8 at https://github.com/ultralytics/ultralytics. Recommend fixes are to train a new model using the latest 'ultralytics' package or to run a command with an official YOLOv8 model, i.e. 'yolo predict model=yolov8n.pt'
This repo is created using the yolov8 code and it is obvious from the ERROR that, the yolov5 trained model will not work here. You can use a model trained with yolov8 train.py
in this case.
Dear @CodingMantras, I got it. Thank you very much.
Dear Sir @CodingMantras, I have modified several YOLOv5 models and want to apply them to your app. How and where can I change the code? I am looking forward to hearing from you soon. Thank you very much. Best regards.