Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Pretrain model for single image #40

Open
Mps24-7uk opened this issue May 7, 2020 · 2 comments
Open

Test Pretrain model for single image #40

Mps24-7uk opened this issue May 7, 2020 · 2 comments

Comments

@Mps24-7uk
Copy link

Mps24-7uk commented May 7, 2020

Thanks for an amazing repository.

How can I test the result with Cityscapes pre-trained weights for the single image?

@Mps24-7uk Mps24-7uk changed the title Test for Result for single image Test Pretrain model for single image May 7, 2020
@huang45
Copy link

huang45 commented Jul 28, 2020

Same question, pls help~

@jfhauris
Copy link

@PingoLH @Mps24-7uk @huang45
I have same issue.

I am trying to use test.py to test a single (or couple of) images.
Can you share a typical test.py command line to do this?
I am using the following but it is not working:
python test.py --model_path '/home/arl/Documents/FCHARDNET/FCHarDNet-master/ptsemseg/models/hardnet.py' --dataset 'cityscapes' --input '/home/arl/Documents/FCHARDNET/FCHarDNet-master/test_image/index.jpeg' --output '/home/arl/Documents/FCHARDNET/FCHarDNet-master/test_image/index_output.jpeg'
In particular what should the --model_path point to? hardnet.py? or the weights *.pkl?
Also why does --dataset point to cityscapes if I am trying to test my own data?

I get the following error:

File "test.py", line 122, in
test(args)
File "test.py", line 39, in test
device, model, loader = init_model(args)
File "test.py", line 24, in init_model
test_mode=True
File "/home/arl/Documents/FCHARDNET/FCHarDNet-master/ptsemseg/loader/cityscapes_loader.py", line 82, in init
self.images_base = os.path.join(self.root, "leftImg8bit", self.split)
File "/home/arl/anaconda3/envs/rgbsemseg/lib/python3.6/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants