Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot instantiate 'WindowsPath' on your system #1

Open
aneisch opened this issue Apr 6, 2024 · 3 comments
Open

cannot instantiate 'WindowsPath' on your system #1

aneisch opened this issue Apr 6, 2024 · 3 comments

Comments

@aneisch
Copy link

aneisch commented Apr 6, 2024

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
Copy link
Owner

VideoDad commented Apr 8, 2024

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?

@sgottscho
Copy link

Also having this issue, was there ever a solution to using this in docker and not windows?

@VideoDad
Copy link
Owner

A couple possible solutions for this:

  1. Try the other versions of the models (e.g. YOLOv5 .NET or YOLOv8).
  2. Try changing the detection code following the directions in this post: NotImplementedError: cannot instantiate 'PosixPath' on your system ultralytics/yolov5#10240 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants