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

Predict black images #5

Closed
albertoursino opened this issue Jul 4, 2022 · 2 comments
Closed

Predict black images #5

albertoursino opened this issue Jul 4, 2022 · 2 comments

Comments

@albertoursino
Copy link

Hello, why the model predicts a black image?
frame_0011 jpg
If I pass as input a jpg image:
frame_0011

Same behaviour with other images.

I downloaded the pretrained model using these lines of code you provided in the README:

# Imports
import torch
import torch.hub

# Create the model
model = torch.hub.load(
    repo_or_dir='guglielmocamporese/hands-segmentation-pytorch',
    model='hand_segmentor',
    pretrained=True
)

Then I created the dir "checkpoint" on your project directory and put the model there.
Finally, I executed the main passing the predict parameters:

python main.py \
	--mode predict \
	--data_base_path './test_images' \
	--model_checkpoint "./checkpoint/checkpoint.ckpt" \
	--model_pretrained

Note that I'm using Windows, that's why I didn't run the sh(s) you provided.

Thanks for your time!

@guglielmocamporese
Copy link
Owner

Hi albertoursino,

thank you for pointing out this issue. I solved it with the latest commit - this is what I obtained with the fixed code (I used the same commands you reported above in your comment to obtain this output):
prediction

Let me know,

Guglielmo

@guglielmocamporese
Copy link
Owner

guglielmocamporese commented Jun 16, 2023 via email

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

2 participants