Skip to content

Instantly share code, notes, and snippets.

@kaczmarj
Created November 9, 2023 15:51
Show Gist options
  • Save kaczmarj/70409bc57dd65e6727d71b72fda20689 to your computer and use it in GitHub Desktop.
Save kaczmarj/70409bc57dd65e6727d71b72fda20689 to your computer and use it in GitHub Desktop.
measure runtime of QuPath WSInfer extension
// groovy script to measure running time of wsinfer
import groovy.time.TimeCategory
qupath.ext.wsinfer.ui.WSInferPrefs.deviceProperty().setValue("cpu");
selectAnnotations()
def timeStart = new Date()
qupath.ext.wsinfer.WSInfer.runInference("kaczmarj/breast-tumor-resnet34.tcga-brca")
def timeStop = new Date()
duration = TimeCategory.minus(timeStop, timeStart)
println duration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment