ScaledYOLOv4
ScaledYOLOv4 copied to clipboard
Error in training _pickle.UnpicklingError: STACK_GLOBAL requires str
train(hyp, opt, device, tb_writer) File "train.py", line 151, in train world_size=opt.world_size) File "/content/ScaledYOLOv4/utils/datasets.py", line 60, in create_dataloader pad=pad) File "/content/ScaledYOLOv4/utils/datasets.py", line 337, in init cache = torch.load(cache_path) # load File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 608, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 777, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: STACK_GLOBAL requires str CPU times: user 105 ms, sys: 15.2 ms, total: 120 ms
train(hyp, opt, device, tb_writer) File "train.py", line 151, in train world_size=opt.world_size) File "/content/ScaledYOLOv4/utils/datasets.py", line 60, in create_dataloader pad=pad) File "/content/ScaledYOLOv4/utils/datasets.py", line 337, in init cache = torch.load(cache_path) # load File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 608, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 777, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: STACK_GLOBAL requires str CPU times: user 105 ms, sys: 15.2 ms, total: 120 ms
Most likely you need to check ur path to --cfg while running train.py. It should be like --cfg models/yolov4-p5.yaml
I have checked everything but still facing same issue
please delete your .cache files and run again.
I have 20 labeled images, one sample is below, i have trained Scaled Yolo my validation Precision , Recall and mAP is 0, what should I do
train with your original image resolution and recalculate your anchors. if k-means shows that most anchors should be < 12, add P2 prediction layer.
How do i calculate anchors?
and Where to add P2 prediction layer?
you could use k-means to calculate anchors, and add P2 prediction layer before P3 prediction layer.
did this repo calculate k means?
Could you please share here I am new to Object detection
tutorial and examples: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov3_5l.cfg
Okay means this repo does not have this features
Please shows how to change models files in your repo?
I`ve had the same issue:
Using SyncBatchNorm()
Traceback (most recent call last):
File "train.py", line 443, in
I meet this problem too when I try to train on my custom data though Pytorch_yolov4,so how canI I fix it?
Maybe it’s the Cache under the dataset path, please try to delete the two files dataset/train/labels.cache and dataset/val/labels.cache
Maybe it’s the Cache under the dataset path, please try to delete the two files dataset/train/labels.cache and dataset/val/labels.cache
It worked for me using the Yolov7 project.
Deleting dataset/train/labels.cache and dataset/val/labels.cache also worked for me on Yolov7.
Deleting dataset/train/labels.cache and dataset/val/labels.cache also worked for me on Yolov7.
Is there 'dataset' path in original yolov7? I can't find dataset folder there
Maybe it’s the Cache under the dataset path, please try to delete the two files dataset/train/labels.cache and dataset/val/labels.cache
It works, thanks!
nb