Skip to content

Instantly share code, notes, and snippets.

@Saafke
Last active July 13, 2020 11:47
Show Gist options
  • Save Saafke/27fd88d9f3c3d9b9fbaabad84e035797 to your computer and use it in GitHub Desktop.
Save Saafke/27fd88d9f3c3d9b9fbaabad84e035797 to your computer and use it in GitHub Desktop.
# Read the desired model
path = "EDSR_x3.pb"
sr.readModel(path)
# Set CUDA backend and target to enable GPU inference
sr.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
sr.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)
#etcetera..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment