codeproject / CodeProject.AI-Server

CodeProject.AI Server is a self contained service that software developers can include in, and distribute with, their applications in order to augment their apps with the power of AI.
Other
636 stars 143 forks source link

Object Detection(YOLO) Custom-Models #23

Closed ryfon closed 1 year ago

ryfon commented 1 year ago

Yolo updated .pt format and all newly trained models no longer work. Giving error: (Can't get attribute 'DetectionModel' on )

After updating to newest yolov5, only notable change needed was in process.py line 10 scale_coords, -> scale_boxes, line 119 pred[:, :4] = scale_coords(img.shape[2:], pred[:, :4], img0.shape).round() -> pred[:, :4] = scale_boxes(img.shape[2:], pred[:, :4], img0.shape).round()

ChrisMaunder commented 1 year ago

We've updated the next release with the latest YOLO code