HypoX64 / DeepMosaics

Automatically remove the mosaics in images and videos, or add mosaics to them.
GNU General Public License v3.0
2.08k stars 435 forks source link

Adaptive Mosaic Detection Threshold? #43

Open BrandonC150 opened 3 years ago

BrandonC150 commented 3 years ago

Anybody know how to implement adaptive threshold, id be using ("clean_frame_by_frame" all files in folder)! All of the frames have mosaic but ~1/2 of them have mosaiced areas that are too small to be detected with the default threshold of 64. By setting the threshold = 2 all frames are demosaiced, but those with large mosaiced areas are damaged by the very low threshold!

Proposed Solution - if no mosaic is detected initally, the threshold is decreased and the demosaic is reatempted until mosaic is found, and the threshold would be reset to the default for the first attemp of the following frame

Im still fairly new to Python so idk how that would be coded, I'm still learning the language😅 also if its possible to retrain a model on CPU, however slow it may be would still be preferable

IE) if the same 100frames are attemped 10000times, attempt 10000 should look better than attemp 1, not be identical

HypoX64 commented 3 years ago

Thanks for your advice. I will improve the algorithm of mosaic detection.😂

gef12 commented 3 years ago

BrandonC150, the parameter you used was --mask threshold = 2?