|
2 anos atrás | |
---|---|---|
.. | ||
examples | 4 anos atrás | |
networks | 4 anos atrás | |
LICENSE | 4 anos atrás | |
README.md | 2 anos atrás | |
dataloader.py | 4 anos atrás | |
demo.py | 4 anos atrás | |
generate_trimaps.py | 4 anos atrás | |
requirements.txt | 4 anos atrás |
This repository contains the code for Image Matting with state-of-the-art Method F, B, Alpha Matting blogpost.
Please, follow the instruction to launch the demonstration script:
pip3 install -r requirements.txt
;python3 demo.py
to use default arguments. Use python3 demo.py -h
for details.The results will be saved into ./examples/predictions
by default.
If you want to run the matting network on your own images you will need to generate the corresponding trimaps first. This process is supposed to be manual but that's too burdensome. Instead, please follow the instruction below to launch the trimap generation process using a semantic segmentation algorithm:
python generate_trimaps.py -i /path/to/your/images (should be a directory) --target_class cat (consult --help for other options)
path/to/your/images/trimaps
python demo.py --image_dir path/to/your/images --trimap_dir path/to/your/images/trimaps --output_dir path/to/save
to get predictionsWant to become an expert in AI? AI Courses by OpenCV is a great place to start.