{"repo":"leijue222/portrait-matting-unet-flask","free":true,"listed":false,"github":"https://github.com/leijue222/portrait-matting-unet-flask","clone":"git clone https://github.com/leijue222/portrait-matting-unet-flask.git","description":"Portrait Mating implementation in UNet with PyTorch.","language":"Python","stars":167,"topics":["pytorch","matting","segmentation","flask","portrait"],"license":"GPL-3.0","category":"machine-learning","readme_excerpt":"Portrait Mating implementation in UNet with PyTorch. Segmentation Demo Result: Matting Demo Result: For the convenience of demonstration, I built the API service through Flask, and finally deployed it on WeChat Mini Program. The code part of the WeChat applet is in here portrait-matting-wechat. Dependencies - Python 3.6 - PyTorch = 1.1.0 - Torchvision = 0.3.0 - Flask 1.1.1 - future 0.18.2 - matplotlib 3.1.3 - numpy 1.16.0 - Pillow 6.2.0 - protobuf 3.11.3 - tensorboard 1.14.0 - tqdm==4.42.1 Data This model was trained from scratch with 18000 images (data augmentation by 2000images) Training dataset was from Deep Automatic Portrait Matting. Your can download in baidu cloud http://pan.baidu.com/s/1dE14537. Password: ndg8 For academic communication only, if there is a quote, please inform the original author! We augment the number of images by perturbing them withrotation and scaling. Four rotation angles{−45◦,−22◦,22◦,45◦}and four scales{0.6,0.8,1.2,1.5}are used. We also apply four different Gamma transforms toincrease color variation. The Gamma values are{0.5,0.8,1.2,1.5}. After thesetransforms, we have 18K training images. Run locally Note : Use Python 3 Prediction You can easily test the output masks on your images via the CLI. To predict a single image and save it: To predict a multiple images and show them without saving them: You can specify which model file to use with --model MODEL.pth . Training By default, the scale is 0.5, so if you wish to obtain better results (but ","default_branch":null,"files":null,"tree":[],"storefront":"/r/leijue222","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/leijue222/portrait-matting-unet-flask/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}