GothicAi / InstaBoost-pypi

47 stars 11 forks source link

global_matting has no effect #3

Closed qianyizhang closed 5 years ago

qianyizhang commented 5 years ago

i randomly process 50 coco examples with get_instance_group.extract() and default config step by step it seems global_matting does not have ANY effect to the image, does it make sense?

i make the following change after line 173 https://github.com/GothicAi/InstaBoost-pypi/blob/master/instaboost/get_instance_group.py#L173

res =alphamapi-maskgroupi*255
print(res.max())
Fang-Haoshu commented 5 years ago

Hi, can you save the processed image and see the results?

qianyizhang commented 5 years ago

what do you mean. it's not an empty image, but pretty much the same as

mask = trimapi>0
alphamapi = 255 * mask 

so I wonder if that's due to the default config, or something wrong with the opencv_mat?

Fang-Haoshu commented 5 years ago

After using

new_ann, new_img = get_new_data(ori_anns: list, 
                                ori_img: np.ndarray, 
                                config: InstaBoostConfig, 
                                background: np.ndarray)

you can get a new image, can you post some images here? We can check these new images to see if opencv_mat has effect

qianyizhang commented 5 years ago

sorry for the delay, got caught up with works. heres a link for 3 sets of images, each processed by get_new_data with default config, where the original one is imageid_orig.jpeg (taken from coco2017)

https://postimg.cc/gallery/1shiasqt0/

hope this helps. happy moon-cake festival :P,

Fang-Haoshu commented 5 years ago

Haha thanks, happy moon-cake festival :P. I checked the images you generated, the matting is fine:D

Have fun!