Skip to content

Instantly share code, notes, and snippets.

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