- Mating is the technique of extracting foreground from an image by calculating its color and transparency. It is widely used in the film industry to replace background, image composition, and visual effects. Each pixel in the image will have a value that represents its foreground transparency, called Alpha. The set of all Alpha values in an image is called Alpha Matte. The part of the image covered by the mask can be extracted to complete foreground separation.
- Mating is the technique of extracting foreground from an image by calculating its color and transparency. It is widely used in the film industry to replace background, image composition, and visual effects. Each pixel in the image will have a value that represents its foreground transparency, called Alpha. The set of all Alpha values in an image is called Alpha Matte. The part of the image covered by the mask can be extracted to complete foreground separation.
- For more information, please refer to: [modnet_resnet50vd_matting](https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.3/contrib/Matting)
- For more information, please refer to: [modnet_resnet50vd_matting](https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.3/contrib/Matting)
## II. Installation
## II. Installation
...
@@ -46,11 +46,11 @@
...
@@ -46,11 +46,11 @@
- ```shell
- ```shell
$ hub install modnet_resnet50vd_matting
$ hub install modnet_resnet50vd_matting
```
```
- In case of any problems during installation, please refer to:[Windows_Quickstart](../../../../docs/docs_en/get_start/windows_quickstart.md)
- In case of any problems during installation, please refer to:[Windows_Quickstart](../../../../docs/docs_en/get_start/windows_quickstart.md)
$ hub run modnet_resnet50vd_matting --input_path "/PATH/TO/IMAGE"
$ hub run modnet_resnet50vd_matting --input_path "/PATH/TO/IMAGE"
```
```
- If you want to call the Hub module through the command line, please refer to: [PaddleHub Command Line Instruction](../../../../docs/docs_en/tutorial/cmd_usage.rst)
- If you want to call the Hub module through the command line, please refer to: [PaddleHub Command Line Instruction](../../../../docs/docs_en/tutorial/cmd_usage.rst)
...
@@ -76,10 +76,10 @@
...
@@ -76,10 +76,10 @@
- ### 3、API
- ### 3、API
- ```python
- ```python
def predict(self,
def predict(self,
image_list,
image_list,
trimap_list,
trimap_list,
visualization,
visualization,
save_path):
save_path):
```
```
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
- result (list(numpy.ndarray)):The list of model results.
- result (list(numpy.ndarray)):The list of model results.
## IV. Server Deployment
## IV. Server Deployment
- PaddleHub Serving can deploy an online service of matting.
- PaddleHub Serving can deploy an online service of matting.