October 24, 2024
Chicago 12, Melborne City, USA
python

Running YOLOv8 without pip instralling Ultralytics


I am trying to code yolov8 from scratch in ipynb and use the pre-trained weight to carry out inferencing on an input image. Has anyone tried it before? I need some guide on how to code and implement it.

I tried a bunch of codes but I get this error

C:\Users\ca8mc\AppData\Local\Temp\ipykernel_55972\3939067829.py:117: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don’t have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state_dict = torch.load(weights_path, map_location=’cpu’)[‘model’].float().state_dict()

ImportError: cannot import name ‘version‘ from ‘ultralytics’ (unknown location)

But bare in mind I don’t want to use the ultralytics library.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video