MiniBullLab / easy_ai

3 stars 1 forks source link

TypeError: __init__() missing 2 required positional arguments: 'image_size' and 'resize_type' #61

Closed foww-0001 closed 3 years ago

foww-0001 commented 3 years ago
python3 easyai/train_task.py -t segment -i ../../data/seg/ImageSets/train.txt -v ../../data/seg/ImageSets/val.txt -m segnet -p ./easy_tools/data/segnet.pt 

运行segnet训练出现报错,错误如下:

Traceback (most recent call last):
  File "easyai/train_task.py", line 61, in <module>
    main()
  File "easyai/train_task.py", line 56, in main
    train_task.train(options.model, 0, options.config_path, options.pretrainModel)
  File "easyai/train_task.py", line 29, in train
    task = build_from_cfg(task_args, REGISTERED_TRAIN_TASK)
  File "/easy_data/code/easy_ai/easyai/utility/registry.py", line 107, in build_from_cfg
    return obj_cls(**args)
  File "/easy_data/code/easy_ai/easyai/tasks/seg/segment_train.py", line 27, in __init__
    self.segment_test = SegmentionTest(cfg_path, gpu_id, config_path)
  File "/easy_data/code/easy_ai/easyai/tasks/seg/segment_test.py", line 25, in __init__
    self.output_process = SegmentResultProcess()
TypeError: __init__() missing 2 required positional arguments: 'image_size' and 'resize_type'

@lpj0822

lpj0822 commented 3 years ago

bug已经修好