foamliu / Deep-Image-Matting-PyTorch

Deep Image Matting implementation in PyTorch
MIT License
816 stars 185 forks source link

How can i get the Trimaps of my pictures? #31

Closed huangjunxiong11 closed 4 years ago

huangjunxiong11 commented 4 years ago

Now, I got a model, I want to use it but I can't, because I have not the Trimaps of my pictures. Are there the script of code to build the Trimaps? How can i get the Trimaps of my pictures?

leijue222 commented 4 years ago

The principle of the paper requires us to provide two pictures:images and the image's trimap 1585115954(1)

Get Trimap's code in here: https://github.com/foamliu/Deep-Image-Matting-PyTorch/blob/db6a96de7dd28e0a6746ec4d9a1c2efdf200c701/data_gen.py#L87

But this function need we provide alpha image. It seems we have to get it by ourself. Obtained manually by PS or by semantic segmentation model

This is my personal view,I don't know if this is right.

sunweixings commented 4 years ago

你好,请问你是否能提供预训练模型以供参考?

foamliu commented 4 years ago

It depends on trimaps.