Code Monkey home page Code Monkey logo

Comments (16)

aisegmentcn avatar aisegmentcn commented on September 13, 2024

1,show your dialate and erode code pls.
2,can you share your adobe dataset to me ?

from matting_human_datasets.

FantasyJXF avatar FantasyJXF commented on September 13, 2024

Sorry for the late reply.

  1. The awful trimap is from this file. And I think this one might be better.

  2. pls leave me your email

  3. How did you generate trimaps?

from matting_human_datasets.

aisegmentcn avatar aisegmentcn commented on September 13, 2024

@FantasyJXF thks, my email is : [email protected] , or you can contact me via wechat : Freedom110620

from matting_human_datasets.

Neptuneer avatar Neptuneer commented on September 13, 2024

Thank you for sharing the dataset. I meet the same problem. And many mistakes were found in the "matting" images when I checked up the data. I guess they are not the standard alpha mattes.
image

from matting_human_datasets.

Jason-xin avatar Jason-xin commented on September 13, 2024

@FantasyJXF 请问你最后用这个数据集去训练Semantic_Human_Matting的代码了吗?你是怎么做的,我看那个代码的训练需要alpha图和trimap图作为输入,他的trimap是从01的mask图生成出来的。

from matting_human_datasets.

FantasyJXF avatar FantasyJXF commented on September 13, 2024

@Neptuneer This dataset is definitely NOT for alpha matting, since they are not precise enough, and has many flaws if you look into the images.

@Jason-xin Yes, I trained the SHM model with this dataset several times, it took me 3 days training with all the images, still couldn't get a useful model. As for the trimap, try to get mask image from alpha image, and then generate trimap image, maybe you could find a better way.

from matting_human_datasets.

Jason-xin avatar Jason-xin commented on September 13, 2024

@Neptuneer This dataset is definitely NOT for alpha matting, since they are not precise enough, and has many flaws if you look into the images.

@Jason-xin Yes, I trained the SHM model with this dataset several times, it took me 3 days training with all the images, still couldn't get a useful model. As for the trimap, try to get mask image from alpha image, and then generate trimap image, maybe you could find a better way.

@FantasyJXF
try to get mask image from alpha image?
Just set 255 for all larger than 126 and set 0 for all smaller than 126??
image
And the trimap like this for your referred image(1803232244-00000372.png), You think this is awful trimap?

And In Section 4.5 of Semantic_Human_Matting's paper, it said "generate the trimap ground truth by dilating the groundtruth alpha mattes" on T-Net pre-train

from matting_human_datasets.

FantasyJXF avatar FantasyJXF commented on September 13, 2024

As you can see, the trimap I generated is awful, as for your trimap, I think it's Okay

from matting_human_datasets.

Jason-xin avatar Jason-xin commented on September 13, 2024

@FantasyJXF But I just convert alpha image to binary mask image (set 255 for all larger than 126 and set 0 for all smaller than 126), then run this code like you。。。

if possible, can you add me wechat "jasonxin8"? Thanks a lot!

from matting_human_datasets.

Neptuneer avatar Neptuneer commented on September 13, 2024

@Jason-xin The pixels values of unknown regions in alpha mattes are (0, 255), while the pixels in foreground and background regions are fixed to 255 and 0, respectively. Your operation might miss so many pixels in unknown region. Code as follow may help you. BTW, this dataset is NOT a alpha dataset. DO NOT use it to train a alpha matting model.

def gen_trimap(alpha):
k_size = random.choice(range(1, 5))
iterations = np.random.randint(1, 20)
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (k_size, k_size))
dilated = cv2.dilate(alpha, kernel, iterations)
eroded = cv2.erode(alpha, kernel, iterations)
trimap = np.zeros(alpha.shape)
trimap.fill(128)
trimap[eroded >= 255] = 255
trimap[dilated <= 0] = 0
return trimap

from matting_human_datasets.

FantasyJXF avatar FantasyJXF commented on September 13, 2024

@Neptuneer From pytorch-dim? HaHa.

I think the k_size could be larger.

So do you have any other alpha matting dataset, except for Adobe?

from matting_human_datasets.

Jason-xin avatar Jason-xin commented on September 13, 2024

@aisegmentcn
image

from matting_human_datasets.

Neptuneer avatar Neptuneer commented on September 13, 2024

@FantasyJXF Yes(with a shy face).
I guess k_size is too small when it is set to 1, but did you get a better result when you enlarge the k_size? The trimaps look worse visually when I enlarge the k_size.
I have sent e-mails to the authors of Deep Automatic Portrait Matting and Semantic Human Matting for datasets, but haven't got any reply for a long time.

from matting_human_datasets.

aisegmentcn avatar aisegmentcn commented on September 13, 2024

@Jason-xin 建议根据128做二值化,然后膨胀获得未知区域;alpha可以设置一个最大最小阈值做一次截断。另外,这是我们去年初整理的能公开的数据集,因为图片来自互联网。更大更高质量的训练数据集无法公开,但可以论文合作的形式单独合作,也是免费的。

from matting_human_datasets.

hexiangquan avatar hexiangquan commented on September 13, 2024

@ @Neptuneer did you have get Deep Automatic Portrait Matting and Semantic Human Matting dataset?

from matting_human_datasets.

Neptuneer avatar Neptuneer commented on September 13, 2024

@hexiangquan Not yet.

from matting_human_datasets.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.