Closed Jen-Vu closed 3 years ago
Hi @Jen-Vu , Did you find anything related to the solution you are looking for?
Hi @Jen-Vu , If you are testing the model on custom data or given data you don't need data_colormask,data_mask, just create these 2 folders otherwise one assert failure error might appear. data_pose are the openpose coco model results. data_edge are mask for the cloth ( data_color in this case )
@MotiBaadror - thank you! Have you been able to run and test this ACGPN model with custom data?
Hi @Jen-Vu , You can find the steps here
@Jen-Vu What tools do you use to preprocess test_img and test_color to get test_label (person segmentation) and test_edge (cloth mask)?
@MotiBaadror Thanks for share you ideas
Hi, I want to share the code with i generated the mask for the clothes
import numpy as np
import cv2
from matplotlib import pyplot as plt
PATH_IMG ="5.jpg"
image = cv2.imread(PATH_IMG)
mask = np.zeros(image.shape[:2], dtype="uint8")
rect = (1, 1, mask.shape[1], mask.shape[0])
fgModel = np.zeros((1, 65), dtype="float")
bgModel = np.zeros((1, 65), dtype="float")
start = time.time()
(mask, bgModel, fgModel) = cv2.grabCut(image, mask, rect, bgModel,
fgModel, iterCount=10, mode=cv2.GC_INIT_WITH_RECT)
outputMask = np.where((mask == cv2.GC_BGD) | (mask == cv2.GC_PR_BGD),0, 1)
outputMask = (outputMask * 255).astype("uint8")
plt.imshow(image)
plt.title('my picture')
plt.show()
plt.imshow(outputMask, cmap="gray")
We have a colab inference link, you may check the process there.
Very nice work! Thanks for sharing. Could you please explain how you pre-process data (e.g. how you derived the data_colormask, data_mask, data_edge, data_pose etc.)? Many thanks!