lxtGH / Fast_Seg

This repo provides :zap: fast:zap: semantic segmentation models on CityScapes/Camvid DataSet by Pytorch
Apache License 2.0
208 stars 36 forks source link

TypeError: __init__() got an unexpected keyword argument 'num_classes' #20

Closed i-am-nut closed 3 years ago

i-am-nut commented 3 years ago

I'm trying to run whole evaluation command inside train_icnet.sh the command is:

python val.py --data_set cityscapes \
--data_dir "/nas/dataset/CityScapes" \
--data_list "./data/cityscapes/val.txt" \
--arch ICNet \
--rgb 0 \
--restore_from "./saveICNet/icnet_final.pth" \
--whole True \
--output_dir "./ICNet_vis"

and the output i get is:

Traceback (most recent call last):
  File "val.py", line 264, in <module>
    val()
  File "val.py", line 203, in val
    model = models.__dict__[args.arch](num_classes=args.num_classes, data_set=args.data_set)
TypeError: __init__() got an unexpected keyword argument 'num_classes'

How can i solve this?

i-am-nut commented 3 years ago

instead of arch ICNet, i had to choose icnet