Explorar el Código

src image conversion on gpu

subDesTagesMitExtraKaese hace 4 años
padre
commit
f2eaf5d274
Se han modificado 1 ficheros con 0 adiciones y 1 borrados
  1. 0 1
      inference_webcam.py

+ 0 - 1
inference_webcam.py

@@ -182,7 +182,6 @@ class Displayer(QMainWindow):
 
 def cv2_frame_to_cuda(frame, datatype = torch.float32):
     frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
-    #return ToTensor()(Image.fromarray(frame)).unsqueeze_(0).to(datatype).cuda()
     pic = Image.fromarray(frame)
     img = torch.ByteTensor(torch.ByteStorage.from_buffer(pic.tobytes()))
     img = img.cuda()