VITA-Group / FasterSeg

[ICLR 2020] "FasterSeg: Searching for Faster Real-time Semantic Segmentation" by Wuyang Chen, Xinyu Gong, Xianming Liu, Qian Zhang, Yuan Li, Zhangyang Wang
MIT License
525 stars 107 forks source link

CUDA_VISIBLE_DEVICES=0 python train_search.py when we run this command getting error? #12

Closed Naveennavik closed 4 years ago

Naveennavik commented 4 years ago

Your work seem to be good enough to see but i have some doubts When i tried running the above command it showing error Traceback (most recent call last): File "train_search.py", line 23, in from datasets.cityscapes.cityscapes import Cityscapes File "/media/drive/2f08d5f1-1439-4edf-9bb4-1d19896475a5/Naveen/FasterSeg/tools/datasets/init.py", line 1, in from .cityscapes import Cityscapes File "/media/drive/2f08d5f1-1439-4edf-9bb4-1d19896475a5/Naveen/FasterSeg/tools/datasets/cityscapes/init.py", line 1, in from .cityscapes import Cityscapes File "/media/drive/2f08d5f1-1439-4edf-9bb4-1d19896475a5/Naveen/FasterSeg/tools/datasets/cityscapes/cityscapes.py", line 6, in class Cityscapes(BaseDataset): TypeError: module.init() takes at most 2 arguments (3 given) May i know what is the reason for this error @chenwydj @TianlongChenTAMU

chenwydj commented 4 years ago

Hi @Naveennavik! Thank you for your interest in our work!

I just cloned my repo and tested it again, and the search script works. I did not meet your error.

Could you please make sure you are on the latest commit?

Naveennavik commented 4 years ago

Thanks for replying,I'm using latest commit only . Can i use the test to work on my own dataset?

chenwydj commented 4 years ago

You can learn how to write your own dataset by following BaseDataset.py and cityscapes.py.

Naveennavik commented 4 years ago

In BaseDataset.py main these are the line i need to give path right? img_root=is the path to the image folder whereas train_source and eval_source is what may i know Big Thanks in advance data_setting = {'img_root': '', 'gt_root': '', 'train_source': '', 'eval_source': ''}

chenwydj commented 4 years ago

Please follow this configuration file.

Naveennavik commented 4 years ago

For the new dataset we need train and then only we can test right orelse we can directly run test code? I dont understand clearly on the documentation how to run ?

chenwydj commented 4 years ago

If your dataset is very different from Cityscapes (e.g. different number of semantic classes, large appearance gap), then yes, you first need to train on your dataset, then evaluate.

Naveennavik commented 4 years ago

cityscapes_train_fine.txt cityscapes_train_val_fine.txt cityscapes_val_fine.txt cityscapes_test.txt How to prepare these txt files for further process

chenwydj commented 4 years ago

You can just use python to list all the file names and write them into a file with the same format.