You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to train DRNET on the cityscapes dataset, here are the configurations for training:
DEVICE : cpu # device used for training and evaluation (cpu, cuda, cuda0, cuda1, ...)SAVE_DIR : '/home/banana/Docs/VScode/Python/RSM_projects/Auto_Pilot/Kromka_Semantic_test/DDR-NET_output'# output folder name used for saving the model, logs and inference resultsMODEL:
NAME : DDRNet # name of the model you are usingBACKBONE : DDRNet-23slim # model variantPRETRAINED : '/home/banana/Docs/VScode/Python/RSM_projects/Auto_Pilot/Kromka_Semantic_test/pretrained_models/DDRNet-23slim.pth'# backbone model's weight DATASET:
NAME : CityScapes # dataset name to be trained with (camvid, cityscapes, ade20k)ROOT : '/media/banana/Linux_disk/Docs/data/cityscapes'# dataset root pathIGNORE_LABEL : 255TRAIN:
IMAGE_SIZE : [1024, 1024] # training image size in (h, w)BATCH_SIZE : 8# batch size used to trainEPOCHS : 1# number of epochs to trainEVAL_INTERVAL : 20# evaluation interval during trainingAMP : false # use AMP in trainingDDP : false # use DDP trainingLOSS:
NAME : OhemCrossEntropy # loss function name (ohemce, ce, dice)CLS_WEIGHTS : false # use class weights in loss calculationOPTIMIZER:
NAME : adamw # optimizer nameLR : 0.001# initial learning rate used in optimizerWEIGHT_DECAY : 0.01# decay rate used in optimizer SCHEDULER:
NAME : warmuppolylr # scheduler namePOWER : 0.9# scheduler powerWARMUP : 10# warmup epochs used in schedulerWARMUP_RATIO : 0.1# warmup ratioEVAL:
MODEL_PATH : '/home/banana/Docs/VScode/Python/RSM_projects/Auto_Pilot/Kromka_Semantic_test/DDR-NET_output/ddrnet_23slim_city.pth'# trained model file pathIMAGE_SIZE : [1024, 1024] # evaluation image size in (h, w) MSF:
ENABLE : false # multi-scale and flip evaluation FLIP : true # use flip in evaluation SCALES : [0.5, 0.75, 1.0, 1.25, 1.5, 1.75] # scales used in MSF evaluation TEST:
MODEL_PATH : '/home/banana/Docs/VScode/Python/RSM_projects/Auto_Pilot/Kromka_Semantic_test/DDR-NET_output/ddrnet_23slim_city.pth'# trained model file pathFILE : 'assests/cityscapes'# filename or foldername IMAGE_SIZE : [1024, 1024] # inference image size in (h, w)OVERLAY : true # save the overlay result (image_alpha+label_alpha)
but when I start training I get the following error:
Traceback (most recent call last):
File "/home/banana/Docs/VScode/Python/RSM_projects/Auto_Pilot/Kromka_Semantic_test/DDR-NET/semantic-segmentation/tools/train.py", line 128, in<module>
main(cfg, gpu, save_dir)
File "/home/banana/Docs/VScode/Python/RSM_projects/Auto_Pilot/Kromka_Semantic_test/DDR-NET/semantic-segmentation/tools/train.py", line 42, in main
model.init_pretrained(model_cfg['PRETRAINED'])
File "/home/banana/Docs/VScode/Python/RSM_projects/Auto_Pilot/Kromka_Semantic_test/DDR-NET/semantic-segmentation/semseg/models/ddrnet.py", line 191, in init_pretrained
self.load_state_dict(torch.load(pretrained, map_location='cpu')['model'], strict=False)
KeyError: 'model'
The text was updated successfully, but these errors were encountered:
I want to train DRNET on the cityscapes dataset, here are the configurations for training:
but when I start training I get the following error:
The text was updated successfully, but these errors were encountered: