zhanghang1989 / PyTorch-Encoding

A CV toolkit for my papers.
https://hangzhang.org/PyTorch-Encoding/
MIT License
2.04k stars 452 forks source link

no longer main.py in deepTEN encoding #285

Open A201124253 opened 4 years ago

A201124253 commented 4 years ago

hello Zhang, I want to "Test pre-trained model on MINC-2500" using deepTEN, but there is no longer "main.py" in this folder. How to test the model on MINC-2500 now? zhijie li

zhanghang1989 commented 4 years ago

Could you try verify.py?

A201124253 commented 4 years ago

Could you try verify.py? I have found verify.py in ~/PyTorch-Encoding/experiments/recognition/verify.py and tryed "python verify.py --dataset minc --model deepten_resnet50_minc --nclass 23 --pretrained --eval" but (base) lzj@ros:~/PyTorch-Encoding/experiments/recognition$ python verify.py --dataset minc --model deepten_resnet50_minc --nclass 23 --pretrained --eval usage: verify.py [-h] [--dataset DATASET] [--base-size BASE_SIZE] [--crop-size CROP_SIZE] [--model MODEL] [--rectify] [--rectify-avg] [--batch-size N] [--workers N] [--no-cuda] [--seed S] [--resume RESUME] [--verify VERIFY] [--export EXPORT] verify.py: error: unrecognized arguments: --nclass 23 --pretrained --eval

I can not set this three arguments.

A201124253 commented 4 years ago

then I ran "python verify.py --dataset minc --model deepten_resnet50_minc" it works but I must delete the argument "train=False, download=True" in "verify.py", because

(base) lzj@ros:~/PyTorch-Encoding/experiments/recognition$ python verify.py --dataset minc --model deepten_resnet50_minc Namespace(base_size=None, batch_size=128, crop_size=224, cuda=True, dataset='minc', export=None, model='deepten_resnet50_minc', no_cuda=False, rectify=False, rectify_avg=False, resume=None, seed=1, verify=None, workers=32) Traceback (most recent call last): File "verify.py", line 132, in main() File "verify.py", line 72, in main transform=transform_val, train=False, download=True) File "/home/lzj/anaconda3/lib/python3.7/site-packages/torch_encoding-1.2.1b20200603-py3.7.egg/encoding/datasets/init.py", line 39, in get_dataset return datasetsname.lower() TypeError: init() got an unexpected keyword argument 'train'

zhanghang1989 commented 4 years ago

Thanks for the feedback. The training code on MINC is broken. But I think you should be able to fix it easily.

A201124253 commented 4 years ago

Thanks for the feedback. The training code on MINC is broken. But I think you should be able to fix it easily.

Thank you for your reply.