Mask-Propagation icon indicating copy to clipboard operation
Mask-Propagation copied to clipboard

RuntimeError: Error(s) in loading state_dict for PropagationNetwork

Open whxueChris opened this issue 3 years ago • 5 comments
trafficstars

Hello ! I want to train the PropagationNetwork on my personal image dataset, so I use the training command CUDA_VISIBLE_DEVICES=0,1 OMP_NUM_THREADS=4 python -m torch.distributed.launch --master_port 9842 --nproc_per_node=2 train.py --id retrain_s01 --load_network ./saves/propagation_model.pth --stage 0.(based on the pretrain model S012). It threw a runtime error.

loadnetwork_error The training command works fine without the --load network parameters. Could you give me some suggestions?

whxueChris avatar Mar 15 '22 09:03 whxueChris

By default, the training goes from stage 0->3. The provided model is in stage 3, and the existing code does not support "going back" to stage 0. Basically the first conv size will not match. Look at this method https://github.com/hkchengrex/Mask-Propagation/blob/ec9309f04ae3c98edb2eb5675c937a699d80006f/model/model.py#L188 if you want to change it.

hkchengrex avatar Mar 15 '22 20:03 hkchengrex

Thanks for your reply! Expect your mentioned method, could I train my personal image cloud dataset in stage 0 and follow your next main video training?

whxueChris avatar Mar 18 '22 03:03 whxueChris

If I understand you correctly, you can just not load the pretrained model.

hkchengrex avatar Mar 18 '22 03:03 hkchengrex

I don't know what your data looks like but I think you need a strong temporal smoothness prior to segment clouds which our model does not provide.

hkchengrex avatar Mar 18 '22 03:03 hkchengrex

I want to solve some special object segmentation problems, such as smoke and cloud. but these kinds of datasets are lacking in the DAVIS dataset, so I want to add them the stage 0. The data looks like this.

blue_patch_217_10_by_19_LC08_L1TP_061017_20160720_20170223_01_T1

whxueChris avatar Mar 18 '22 03:03 whxueChris