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

fix some bugs in demo.py, improve READEME.md #181

Merged
merged 2 commits into from
Jun 11, 2021
Merged

fix some bugs in demo.py, improve READEME.md #181

merged 2 commits into from
Jun 11, 2021

Conversation

fikry102
Copy link

@fikry102 fikry102 commented Jun 9, 2021

fix some bug in demo.py, improve the path in READEME.md

Copy link
Owner

@Tramac Tramac left a 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)
Copy link
Owner

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)

Copy link
Author

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
Copy link
Owner

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.

Copy link
Author

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

Copy link
Owner

@Tramac Tramac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@Tramac Tramac merged commit a7e161a into Tramac:master Jun 11, 2021
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

Successfully merging this pull request may close these issues.

2 participants