hustvl / ViTMatte

[Information Fusion (Vol.103, Mar. '24)] Boosting Image Matting with Pretrained Plain Vision Transformers
MIT License
325 stars 33 forks source link

about train dataset #24

Open luoww1992 opened 9 months ago

luoww1992 commented 9 months ago

in datasetLodaer.py: train_dataset = DataGenerator( data = ImageFileTrain( alpha_dir='path/to/alpha', fg_dir='path/to/fg', bg_dir='path/to/bg', root='path/to/Adobe_Image_Matting' ), phase = 'train' )

i know the alpha_dir is mask path,
Q1: but the fg_dir is RGB image only fg object ? Or is RGBA image the all image with fg and bg ? Q2:the bg_dir is RGB image only bg without fg object mask? Or likes bg in AIM with fg mask?

------ can you share me a demo dataset fold with some pictures ? thank you !

JingfengYao commented 9 months ago

Images in fg_dir and bg_dir are both RGB images. As for demos, maybe you can see here.

luoww1992 commented 9 months ago

@JingfengYao Q1, so train datase likes this: see the fg_image's background must be bg_image ? Q2, And what i mean about demo dataset is : can you share me three images in fg_dir,bg_dir andalpha_dir in your dataset ?

yuqilol commented 2 months ago

Hello, has this problem been solved? Is it your above format

JingfengYao commented 2 months ago

@luoww1992 @yuqilol A1: No, In our setting, there is no requirement for the foreground and background to be associated.
A2: I can't share the demos. Because the dataset is semi-public (owned by DIM). I have no right to share them personally. You should get the dataset following their instructions. BTW, for a simple way to get familiar with matting datasets, you may check GFM. (they are similar in format to DIM data, but we didn't use them in ViTMatte training)