mirror of
https://git.mirrors.martin98.com/https://github.com/xuebinqin/U-2-Net
synced 2025-08-06 08:06:05 +08:00
portrait layout
This commit is contained in:
parent
34c7c7dc0d
commit
a32d4b5164
@ -37,7 +37,9 @@ git clone https://github.com/NathanUA/U-2-Net.git
|
||||
4. Run on your own dataset. <br/>
|
||||
(1) Prepare your images and put them into ```./test_data/test_portrait_images/your_portrait_im/```. **To obtain enough details of the protrait, human head region in the input image should be close to or larger than 512x512. The head background should be relatively clear.** <br/>
|
||||
(2) Run the prediction by command ```python u2net_portrait_demo.py``` will outputs the results to ```./test_data/test_portrait_images/your_portrait_results/```. <br/>
|
||||
(3) The difference between ```python u2net_portrait_demo.py``` and ```python u2net_portrait_test.py``` is that we added a simple [**face detection**](https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_objdetect/py_face_detection/py_face_detection.html) step before the portrait generation in ```u2net_portrait_demo.py```. Because the testing set of APDrawingGAN are normalized and cropped to 512x512 for including only heads of humans, while our own dataset may varies with different resolutions and contents. Therefore, the code ```python u2net_portrait_demo.py``` will detect the biggest face from the given image and then crop, pad and resize the ROI to 512x512 for feeding to the network.
|
||||
(3) The difference between ```python u2net_portrait_demo.py``` and ```python u2net_portrait_test.py``` is that we added a simple [**face detection**](https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_objdetect/py_face_detection/py_face_detection.html) step before the portrait generation in ```u2net_portrait_demo.py```. Because the testing set of APDrawingGAN are normalized and cropped to 512x512 for including only heads of humans, while our own dataset may varies with different resolutions and contents. Therefore, the code ```python u2net_portrait_demo.py``` will detect the biggest face from the given image and then crop, pad and resize the ROI to 512x512 for feeding to the network. The folllowing figure shows how to take your own photos for generating high quality portraits.
|
||||
|
||||

|
||||
|
||||
**(2020-Sep-13)** Our U^2-Net based model is the **6th** in [**MICCAI 2020 Thyroid Nodule Segmentation Challenge**](https://tn-scui2020.grand-challenge.org/Resultannouncement/).
|
||||
|
||||
|
BIN
figures/xuebin-demo.png
Normal file
BIN
figures/xuebin-demo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 548 KiB |
BIN
test_data/test_portrait_images/your_portrait_im/Xuebin-10.jpeg
Normal file
BIN
test_data/test_portrait_images/your_portrait_im/Xuebin-10.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 230 KiB |
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Loading…
x
Reference in New Issue
Block a user