Skip to content

Latest commit

 

History

History
 
 

cascade_psp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

CascadePSP

Input

Image

Input

(Image from https://github.com/hkchengrex/CascadePSP/blob/master/segmentation-refinement/test/aeroplane.jpg)

Mask

Input

(Image from https://github.com/hkchengrex/CascadePSP/blob/master/segmentation-refinement/test/aeroplane.png)

Output

Output

Usage

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 cascade_psp.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 cascade_psp.py --input IMAGE_PATH --savepath SAVE_IMAGE_PATH

This model requires a mask image.
You can specify the mask image by put the file path after the --mask_image option.

$ python3 cascade_psp.py --input IMAGE_PATH --mask_image MASK_IMAGE_PATH

Use the `--generate_mask` option to automatically generate a mask image using u2net.

python3 cascade_psp.py --generate_mask -i input.jpg

Reference

Framework

Pytorch

Model Format

ONNX opset=11

Netron

refinement.onnx.prototxt
inter_s8.onnx.prototxt