zeyad-mansour / lunar

a neural network aim assist that uses real-time object detection accelerated with CUDA on Nvidia GPUs
https://discord.gg/5n6vS95jWp
GNU General Public License v3.0
405 stars 129 forks source link

No such file or directory: 'lib\\best.pt' #107

Open usernmaexxx opened 2 years ago

usernmaexxx commented 2 years ago

I put in everything and this shows up any help?

ORABI2 commented 2 years ago

any solutions ?

MikeGuard commented 1 year ago

that is not the fix, same error : No such file or directory: 'lib\best.pt'. Cache may be out of date, try force_reload=True or see https://github.com/ultralytics/yolov5/issues/36 for help.

MikeGuard commented 1 year ago

to fix it you have to go in the python aimbot.py file and change string 65 with this:

self.model = torch.hub.load('ultralytics/yolov5', 'custom', path='lib\best.pt', force_reload=True).autoshape()

Thunderboltn commented 1 year ago

Then for me it says: [INFO] Loading the neural network model Downloading: "https://github.com/ultralytics/yolov5/archive/master.zip" to C:\Users\user/.cache\torch\hub\master.zip YOLOv5 2023-2-23 Python-3.8.10 torch-1.11.0+cu113 CPU

Traceback (most recent call last): File "C:\Users\user/.cache\torch\hub\ultralytics_yolov5_master\hubconf.py", line 49, in _create model = DetectMultiBackend(path, device=device, fuse=autoshape) # detection model File "C:\Users\user/.cache\torch\hub\ultralytics_yolov5_master\models\common.py", line 345, in init model = attempt_load(weights if isinstance(weights, list) else w, device=device, inplace=True, fuse=fuse) File "C:\Users\user/.cache\torch\hub\ultralytics_yolov5_master\models\experimental.py", line 79, in attempt_load ckpt = torch.load(attempt_download(w), map_location='cpu') # load File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 699, in load with _open_file_like(f, 'rb') as opened_file: File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 231, in _open_file_like return _open_file(name_or_buffer, mode) File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 212, in init super(_open_file, self).init(open(name, mode)) OSError: [Errno 22] Invalid argument: 'lib\x08est.pt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\user/.cache\torch\hub\ultralytics_yolov5_master\hubconf.py", line 60, in _create model = attempt_load(path, device=device, fuse=False) # arbitrary model File "C:\Users\user/.cache\torch\hub\ultralytics_yolov5_master\models\experimental.py", line 79, in attempt_load ckpt = torch.load(attempt_download(w), map_location='cpu') # load File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 699, in load with _open_file_like(f, 'rb') as opened_file: File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 231, in _open_file_like return _open_file(name_or_buffer, mode) File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 212, in init super(_open_file, self).init(open(name, mode)) OSError: [Errno 22] Invalid argument: 'lib\x08est.pt'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\lunar-main\lunar.py", line 74, in main() File "C:\lunar-main\lunar.py", line 21, in main lunar = Aimbot(collect_data = "collect_data" in sys.argv) File "C:\lunar-main\lib\aimbot.py", line 65, in init self.model = torch.hub.load('ultralytics/yolov5', 'custom', path='lib\best.pt', force_reload=True).autoshape() File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\hub.py", line 404, in load model = _load_local(repo_or_dir, model, *args, *kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\hub.py", line 433, in _load_local model = entry(args, **kwargs) File "C:\Users\user/.cache\torch\hub\ultralytics_yolov5_master\hubconf.py", line 83, in custom return _create(path, autoshape=autoshape, verbose=_verbose, device=device) File "C:\Users\user/.cache\torch\hub\ultralytics_yolov5_master\hubconf.py", line 78, in _create raise Exception(s) from e Exception: [Errno 22] Invalid argument: 'lib\x08est.pt'

Any suggestions?