VideoDad / AI-Models

Custom Trained AI Models for object detection
3 stars 0 forks source link

cannot instantiate 'WindowsPath' on your system #1

Open aneisch opened 7 months ago

aneisch commented 7 months ago

I updated the delivery.pt model from this repo (previous version was from Google drive) and am getting an error now. Could this be related to any changes in subsequent trainings? These logs are from CodeProject.AI server running in Docker on Linux:

Infor Object Detection (YOLOv5 6.2): Detecting using delivery
Error Object Detection (YOLOv5 6.2): [NotImplementedError] : Unable to load model at /app/preinstalled-modules/ObjectDetectionYOLOv5-6.2/custom-models/delivery.pt (cannot instantiate 'WindowsPath' on your system)
Error Object Detection (YOLOv5 6.2): Unable to create YOLO detector for model delivery

When reverting back to an older model the detection runs as expected.

VideoDad commented 7 months ago

All the models were trained on a Windows system. The newer ones are trained using Ultralytics modules and for some reason they are serializing various data paths. This was intended to match up to running on a Windows machine but you are using a Docker image which is causing the problem. I'm still searching for a workaround for you. Are you able to use the ONNX models for YOLOv5 NET instead?