Do you want to paint the walls or re-glue them altogether? But you're not quite sure they'll match the surroundings? This program allows to change the walls by the given pattern. This program aims to help with your interior update.
- CUDA 9.2+
- upload a pattern into
demo/patterns
dir - upload your interior image into
demo/source
dir - segment the interior with
get_seg.py
- run
main.py
, select four corners (top left, top-right, bottom-right, bottom-left) with Left Botton of your mouse. -
- Click middle mouse button to apply the pattern on the selected corners
-
- Click right button to delete the last selected corner (if it doesn't seem correct)
You can either select rectangle wall parts one-by-one or just select the bounding four corners to apply the pattern.
See *.py --help
to see additional info. Just play with it!
docker build --build-arg UID="$(id -u)" --build-arg GID="$(id -g)" --build-arg UNAME="auto" -t mmseg_wall -f Dockerfile .
docker run --rm -it --gpus all --net=host --ipc=host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/home/auto/.Xauthority -v $PWD:/home/auto/ mmseg_wall
mim download mmsegmentation --config pspnet_r101-d8_480x480_80k_pascal_context_59 --dest models/
python3 get_seg.py --image demo/source/test.png --output demo/mask/test.png --obj_class wall --device cuda
python3 main.py --image demo/source/test.png --mask demo/mask/test.png --pattern demo/patterns/texture_1.jpg
After you finish, just hit any botton. Results are saved in demo/results
dir
- create tg bot @nikultimo
- automate corners selection
- play with various models. Improve the mask accuracy
- Add online pattern change wrt selected corners
- add weighted sum coefficients adjusting