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

error when preparing trimaps #33

Open
javiermachinelearning opened this issue Sep 22, 2020 · 4 comments
Open

error when preparing trimaps #33

javiermachinelearning opened this issue Sep 22, 2020 · 4 comments

Comments

@javiermachinelearning
Copy link

Following the readme instructions, I generated the main base images of the repo, example:
https://sendgb.com/G9pH6JVBOLZ (3 gigabytes file that inside has images in folders img_raw, img_crop, img_mask, img_mean_grid, img_mean_mask)

but the issue is that the next step, generating the trimaps with this:
python scripts/prepare_seg_tri_dataset.py

gives me:
python scripts/prepare_seg_tri_dataset.py
[2020/09/22 14:41:34.522] INFO (2837) config : Load config from "config.json"
[2020/09/22 14:41:34.558] WARNING (2837) datasets.common : no image is valid
[2020/09/22 14:41:34.558] INFO (2837) main : Compute weight matrix for each image
gives error: no image is valid

how can I solve that issue? thank you :)

@javiermachinelearning
Copy link
Author

If I try to run the testing with pretrained, to do trimaps:

python scripts/train.py --mode seg_tri --pretrained_fcn8s ./models/fcn8s_from_caffe.npz

[2020/09/22 14:53:12.617] INFO (2845) config : Load config from "config.json"
[2020/09/22 14:53:12.618] INFO (2845) datasets : Create segmentation+ dataset for trimap
[2020/09/22 14:53:12.628] WARNING (2845) datasets.common : no image is valid
[2020/09/22 14:53:12.628] INFO (2845) transforms : Create transform function of trimap segmentation
[2020/09/22 14:53:12.631] INFO (2845) main : Setup serial iterator
[2020/09/22 14:53:12.631] INFO (2845) models : Create FCN8s for trimap segmentation
[2020/09/22 14:53:12.793] INFO (2845) main : Load pretrained FCN8s model (./models/fcn8s_from_caffe.npz)
[2020/09/22 14:53:16.607] INFO (2845) main : Setup optimizer: lr=0.000100, momentum=0.990000, weight_decay=0.000500
[2020/09/22 14:53:16.608] INFO (2845) main : Setup single updater (gpu: -1)
Exception in main training loop: division by zero

fails obviously for same reason, the "no image is valid" message

@newjavaer
Copy link

Hi,can you send me the prepared matting dataset?

@Chinedu25
Copy link

How did you resolve the no image is valid message

@Chinedu25
Copy link

I had to run python scripts/prepare_matting_dataset.py --pseudo_alpha

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