ZexinChen / AlphaTracker

AlphaTracker is a computer vision pipeline with the practical and real-time advantages , which requires minimal hardware requirements and produces reliable tracking of multiple unmarked animals. An easy-to-use user interface further enables manual inspection and curation of results.
61 stars 16 forks source link

Error in training: cannot load `AlphaTracker/Tracking/AlphaTracker/models/sppe/duc_se.pth` #18

Open calebweinreb opened 2 years ago

calebweinreb commented 2 years ago

I obtain the following error when running train.py. Some googling suggests this results from a corrupt file download. When I run md5sum on duc_se.pth, I get 3764b858a2f612f536c841c971ea8e63 (and the file appears to be 34K). Is that correct? If not, can you provide an alternative way to download it?

*** training sppe ***
training with following setting:
CUDA_VISIBLE_DEVICES=0 python train.py \
             --dataset coco \
             --img_folder_train /n/groups/datta/caleb/22_2_1_keypointSORT/log/22_8_5_alphaTracker/AlphaTracker/Tracking/AlphaTracker/train_yolo/darknet//data/top/color/ \
             --annot_file_train /n/groups/datta/caleb/22_2_1_keypointSORT/log/22_8_5_alphaTracker/AlphaTracker/Tracking/AlphaTracker/train_sppe//data/top/data_newLabeled_01_train.h5 \
             --img_folder_val /n/groups/datta/caleb/22_2_1_keypointSORT/log/22_8_5_alphaTracker/AlphaTracker/Tracking/AlphaTracker/train_yolo/darknet//data/top/color/ \
             --annot_file_val /n/groups/datta/caleb/22_2_1_keypointSORT/log/22_8_5_alphaTracker/AlphaTracker/Tracking/AlphaTracker/train_sppe//data/top/data_newLabeled_01_val.h5 \
             --expID top \
             --nClasses 7 \
             --LR 0.0001 --trainBatch 10 \
             --nEpochs 10 \
             --nThreads 6 \
             --loadModel /n/groups/datta/caleb/22_2_1_keypointSORT/log/22_8_5_alphaTracker/AlphaTracker/Tracking/AlphaTracker/models/sppe/duc_se.pth
Loading Model from /n/groups/datta/caleb/22_2_1_keypointSORT/log/22_8_5_alphaTracker/AlphaTracker/Tracking/AlphaTracker/models/sppe/duc_se.pth
Traceback (most recent call last):
  File "train.py", line 204, in <module>
    main()
  File "train.py", line 122, in main
    weight_save = torch.load(opt.loadModel)
  File "/home/csw14/miniconda3/envs/alphatracker/lib/python3.8/site-packages/torch/serialization.py", line 608, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/csw14/miniconda3/envs/alphatracker/lib/python3.8/site-packages/torch/serialization.py", line 777, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.
laurelrr commented 1 year ago

Hi, Thank you for your interest in AlphaTracker! Please see https://github.com/ZexinChen/AlphaTracker/issues/9 on how to download individual files. Thanks, Laurel