-
Notifications
You must be signed in to change notification settings - Fork 586
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
fix some bugs in demo.py, improve READEME.md #181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, there are some code style differences here, please fix it.
scripts/demo.py
Outdated
@@ -41,7 +42,7 @@ def demo(config): | |||
image = Image.open(config.input_pic).convert('RGB') | |||
images = transform(image).unsqueeze(0).to(device) | |||
|
|||
model = get_model(args.model, pretrained=True, root=args.save_folder).to(device) | |||
model = get_model(args.model,local_rank=args.local_rank,pretrained=True, root=args.save_folder).to(device) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model = get_model(args.model, local_rank=args.local_rank, pretrained=True, root=args.save_folder).to(device)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I got it!
README.md
Outdated
@@ -56,7 +56,10 @@ python -m torch.distributed.launch --nproc_per_node=$NGPUS eval.py --model fcn32 | |||
### Demo | |||
``` | |||
cd ./scripts | |||
python demo.py --model fcn32s_vgg16_voc --input-pic ./datasets/test.jpg | |||
python demo.py --model fcn32s_vgg16_voc --input-pic ../datasets/test.jpg | |||
or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the or
should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I add a new line below 'or':
python demo.py --model fcn32s_vgg16_voc --input-pic ../tests/test_img.jpg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
fix some bug in demo.py, improve the path in READEME.md