import cv2 count = cv2.cuda.getCudaEnabledDeviceCount() print(count) # 1 == using cuda, 0 = not using cuda