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
How to test for custom Images #8
Comments
You need add |
But I'm trying to test the model for custom images. Is there any way I can do that? |
You need updata val_fine.txt according to your custom images, and move |
I updated the val_fine.txt according to my images. I'm still not sure what to do about the This is the error:
My images are in the /cityscapes folder and the val_fine.txt is updated accordingly.
On my command line: |
You could print the |
What about the mask images? Are they required when I dont have ground truth? |
If u want to test your own data, u can just modify the val_fine.txt in folder datasets/cityscapes/ according to your data. If u dont have mask images, u can replace mask path with ur img path(for visualize,no GT is ok), then u can run the visualize command: |
@junfu1115 Thank you so much!
|
I'm trying to run inference by modifying test.py to run on custom images. I got the following error with respect to the model checkpoint. I have downloaded the pre-trained model and have added it to
danet/cityscapes/model
path. Here is my modified code; its referencing the correct path of the checkpoint directory.I'm running this from my terminal
CUDA_VISIBLE_DEVICES=0 python test_on_custom.py --model danet --resume-dir cityscapes/model/ --base-size 2048 --crop-size 768 --workers 1 --backbone resnet101 --multi-grid --multi-dilation 4 8 16 --eval
This is the error:
Line 34 is
model.load_state_dict(checkpoint['state_dict'], strict=False)
The text was updated successfully, but these errors were encountered: