(Image from https://github.com/PeikeLi/Self-Correction-Human-Parsing/blob/master/demo/demo.jpg)
Shape : (1, 3, 473, 473)
Shape : (1, 3, 512, 512)
Shape : (1, 3, 512, 512)
- parsing shape : (1, 20, 119, 119)
- fusion shape : (1, 20, 119, 119)
- edge shape : (1, 2, 119, 119)
- parsing shape : (1, 18, 128, 128)
- fusion shape : (1, 18, 128, 128)
- edge shape : (1, 2, 128, 128)
- parsing shape : (1, 7, 128, 128)
- fusion shape : (1, 7, 128, 128)
- edge shape : (1, 2, 128, 128)
CATEGORY = (
'Background', 'Hat', 'Hair', 'Glove', 'Sunglasses', 'Upper-clothes', 'Dress', 'Coat',
'Socks', 'Pants', 'Jumpsuits', 'Scarf', 'Skirt', 'Face', 'Left-arm', 'Right-arm',
'Left-leg', 'Right-leg', 'Left-shoe', 'Right-shoe'
)
CATEGORY = (
'Background', 'Hat', 'Hair', 'Sunglasses', 'Upper-clothes', 'Skirt', 'Pants', 'Dress', 'Belt',
'Left-shoe', 'Right-shoe', 'Face', 'Left-leg', 'Right-leg', 'Left-arm', 'Right-arm', 'Bag', 'Scarf'
)
CATEGORY = (
'Background', 'Head', 'Torso', 'Upper Arms', 'Lower Arms', 'Upper Legs', 'Lower Legs'
)
Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.
For the sample image,
$ python3 human_part_segmentation.py
If you want to specify the input image, put the image path after the --input
option.
You can use --savepath
option to change the name of the output file to save.
$ python3 human_part_segmentation.py --input IMAGE_PATH --savepath SAVE_IMAGE_PATH
By adding the --video
option, you can input the video.
If you pass 0
as an argument to VIDEO_PATH, you can use the webcam input instead of the video file.
$ python3 human_part_segmentation.py --video VIDEO_PATH
By adding the --arch
option, you can specify architecture type which is selected from "lip", "atr", "pascal".
(default is lip)
$ python3 human_part_segmentation --arch lip
Pytorch
ONNX opset=11
resnet-lip.onnx.prototxt
resnet-atr.onnx.prototxt
resnet-pascal.onnx.prototxt