Closed SanjunLiu closed 3 years ago
Sorry for the confusion. --images-src
and --images-bgr
expect directories not files. So you should create two directories and move your input and background images to the directory with the same name. For example, /src/image.png
and /bgr/image.png
Sorry for the confusion.
--images-src
and--images-bgr
expect directories not files. So you should create two directories and move your input and background images to the directory with the same name. For example,/src/image.png
and/bgr/image.png
i have a question ,if i just have a src img ,how to Image matting? if i have a backbound img and a src img,i think this work will be meaningless @PeterL1n
PATH_TO_CHECKPOINT=pytorch_resnet50.pth PATH_TO_IMAGES_SRC_DIR=./scripts/forground_image.jpg PATH_TO_IMAGES_BGR_DIR=./scripts/background_image.jpg PATH_TO_OUTPUT_DIR=./tmp/ output_type=com python inference_images.py \ --model-type mattingrefine \ --model-backbone resnet50 \ --model-backbone-scale 0.25 \ --model-refine-mode sampling \ --model-refine-sample-pixels 80000 \ --model-checkpoint ${PATH_TO_CHECKPOINT} \ --images-src ${PATH_TO_IMAGES_SRC_DIR} \ --images-bgr ${PATH_TO_IMAGES_BGR_DIR} \ --output-dir ${PATH_TO_OUTPUT_DIR} \ --output-type ${output_type}
The output dir is empty: ./tmp/com/nothing