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

Error while starting training #3

Closed
madr3z opened this issue Dec 7, 2021 · 1 comment
Closed

Error while starting training #3

madr3z opened this issue Dec 7, 2021 · 1 comment

Comments

@madr3z
Copy link

madr3z commented Dec 7, 2021

I have set up the dataset etc. When I start training in one of the models' directory (eg. "/1 SConvLSTM/yolov5/", I get the following error after the image scanning is done:

Scanning labels ../../../../datasets//all_in_one/train/labels.cache (20942 found, 0 missing, 3847 empty, 0 duplicate, for 24789 images): 24789it [00:00, 30033.60it/s] Traceback (most recent call last): File "train.py", line 544, in <module> train(hyp, opt, device, tb_writer) File "train.py", line 196, in train testloader = create_dataloader(test_path, imgsz_test, total_batch_size, gs, opt, File "/home/local/xxxx/TYolov5/1 SConvLSTM/yolov5/utils/datasets.py", line 54, in create_dataloader dataset = LoadImagesAndLabels(path, imgsz, batch_size, File "/home/local/xxxx/TYolov5/1 SConvLSTM/yolov5/utils/datasets.py", line 385, in __init__ cache = torch.load(cache_path) # load File "/home/local/xxxx/miniconda3/envs/tyolo/lib/python3.8/site-packages/torch/serialization.py", line 585, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/local/xxxx/miniconda3/envs/tyolo/lib/python3.8/site-packages/torch/serialization.py", line 755, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: STACK_GLOBAL requires str

I looked around and it seems that the issue might be caused by loading the cached labels. What do you think would fix the issue?

@madr3z
Copy link
Author

madr3z commented Dec 8, 2021

I found the problem: it was due to a previously made cache file by an updated yolov5 from Ultralytics repo.

@madr3z madr3z closed this as completed Dec 8, 2021
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

1 participant