paddlehub自动抠图-人像
生活随笔
收集整理的這篇文章主要介紹了
paddlehub自动抠图-人像
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
paddlehub自動摳圖-人像
import os import matplotlib.pyplot as plt import matplotlib.image as mpimg, cv2 import paddlehub as hub import numpy as np # 測試圖片路徑和輸出路徑 input_path = 'img_input/' # 輸入圖片路徑 output_path = 'D:\\xuanyuanproject\\imgProcessing\\handle_photo\\output_img\\' # 輸出圖片路徑 # 待預測圖片 test_img_path = ["001.jpg"] # 文件名稱,可為多個 test_img_path = [input_path + img for img in test_img_path]module = hub.Module(name="deeplabv3p_xception65_humanseg") # 載入訓練模型 input_dict = {"image": test_img_path} results = module.segmentation(data=input_dict, batch_size=4, visualization=True, output_dir=output_path) # data:目標圖片 output_dir: 自動輸出路徑總結
以上是生活随笔為你收集整理的paddlehub自动抠图-人像的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解决NVIDIA显卡 GPU显示器不可用
- 下一篇: simhash