Open Zalmighty opened 10 months ago
I use my images to test, same error occurs above, I don`t know how to deal with it = =! CUDA_VISIBLE_DEVICES=0 python main.py --style ./imgs/style-1.png --input ./imgs/test.png
in main.py
add .convert('RGB')
will fix it
if __name__ == "__main__":
args = get_args()
model = Makeup(args)
imgA = np.array(Image.open(args.input).convert('RGB'))
imgB = np.array(Image.open(args.style).convert('RGB'))
imgB = cv2.resize(imgB, (256, 256))
Traceback (most recent call last): File "main.py", line 34, in <module> model.prn_process(imgA) File "/data1/CPM/makeup.py", line 57, in prn_process self.pos = self.prn.process(self.face) File "/data1/CPM/utils/api.py", line 107, in process detected_faces = self.dlib_detect(image) File "/data1/CPM/utils/api.py", line 56, in dlib_detect return self.face_detector(image, 1) RuntimeError: Unsupported image type, must be 8bit gray or RGB image.