DeepBleed Model
download_deepbleed_model(outdir = NULL) load_deepbleed_model(outdir = NULL) predict_deepbleed(image, mask = NULL, verbose = TRUE, ..., outdir = NULL)
outdir | Output directory for `DeepBleed` model |
---|---|
image | image to segment using `DeepBleed` model |
mask | brain mask image |
verbose | print diagnostic messages |
... | additional arguments to send to
|
A list of the output images and predictions.
https://github.com/muschellij2/deepbleed
# \donttest{ destfile = file.path(tempdir(), "01.tar.xz") dl = download.file( "https://archive.data.jhu.edu/api/access/datafile/1311?gbrecs=true", destfile = destfile)#> Warning: URL 'https://archive.data.jhu.edu/api/access/datafile/1311?gbrecs=true': status was 'Peer certificate cannot be authenticated with given CA certificates'#> Error in download.file("https://archive.data.jhu.edu/api/access/datafile/1311?gbrecs=true", destfile = destfile): cannot open URL 'https://archive.data.jhu.edu/api/access/datafile/1311?gbrecs=true'#> Warning: ‘/bin/tar -xf '/tmp/Rtmp7IZWo0/01.tar.xz' -C '/tmp/Rtmp7IZWo0'’ returned error code 2fname = file.path(tempdir(), "01", "BRAIN_1_Anonymized.nii.gz") mask = file.path(tempdir(), "01", "BRAIN_1_Anonymized_Mask.nii.gz") tdir = tempfile() dir.create(tdir) download_deepbleed_model(outdir = tdir)#> [1] "/tmp/Rtmp7IZWo0/file295a4e6dc76e/"mod = load_deepbleed_model(outdir = tdir)#> Error in py_module_import(module, convert = convert): ImportError: No module named models.vnetpredict_deepbleed(fname, mask = mask, outdir = tdir)#>#> Error in oro.nifti::readNIfTI(..., reorient = reorient): File(s) not found!# }