yolov7_d2
yolov7_d2 copied to clipboard
How to save the model to run on different directory folder.
I trained the model(image segmentation) and got the .pth file and config file. I tried to transfer those files over to my other laptop and ran it with the yolov7 folder there but I get errors
PytorchStreamReader failed reading zip archive: failed finding central directory
I believe this is because it doesn't save it properly and must be kept in the original directory?
Is there a way for me to save it properly to use it in the demo.py file in a different computer?
When I tried running the demo file on colab(original directory for when it was trained) it ran so I think it might be cuz its not in the original dir.
using --opts MODEL.WEIGHTS to specific weights location. Your pth might truncated if can not load. check it first.
@jinfagang
here is the error output from my terminal:
PS C:\Users\gkpod\Desktop\yolov7-main> & c:/Users/gkpod/Desktop/yolov7-main/env/Scripts/Activate.ps1
(env) PS C:\Users\gkpod\Desktop\yolov7-main> python demo.py --config-file config.yaml --input image_t5.jpg -c 0.55 --output detectasd --opts MODEL.WEIGHTS model_final.pth
Install mish-cuda to speed up training and inference. More importantly, replace the naive Mish with MishCuda will give a ~1.5G memory saving during training.
[07/27 14:18:03 detectron2]: Arguments: Namespace(config_file='config.yaml', webcam=False, input='image_t5.jpg', output='detectasd', confidence_threshold=0.55, nms_threshold=0.6, wandb_project=None, wandb_entity=None, opts=['MODEL.WEIGHTS', 'model_final.pth'])
14:18:03 07.27 INFO yolomask.py:86]: YOLO.ANCHORS: [[142, 110], [192, 243], [459, 401], [36, 75], [76, 55], [72, 146], [12, 16], [19, 36], [40, 28]]
14:18:03 07.27 INFO yolomask.py:89]: backboneshape: [64, 128, 256, 512], size_divisibility: 32
[[142, 110], [192, 243], [459, 401], [36, 75], [76, 55], [72, 146], [12, 16], [19, 36], [40, 28]]
[07/27 14:18:03 fvcore.common.checkpoint]: [Checkpointer] Loading from model_final.pth ...
Traceback (most recent call last):
File "C:\Users\gkpod\Desktop\yolov7-main\demo.py", line 199, in