Skip to content

Moorfields-Reading-Centre/detectron2-rpd-yb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up Detectron2-RPD for Windows

Prerequisites: Git and CUDA 10.2, which can be downloaded directly here and here (use the default options when installing).

Step 0) Download win-detectron2-rpd.zip and extract the files. The folder should contain these files:

image

 

Step 1) Install C++ Build Tools

Prior to starting the installation process, make sure to save any important files. In order to finish the installation, a restart is required.

Run "vs_BuildTools.exe"

image

After a couple of seconds, the following window should pop up:

image

Press Continue.

image

Tick the box labelled "Desktop development with C++" (IMPORTANT). Your installer should now look like so:

image

Press Install. (IMPORTANT) After the installation is finished, restart your PC to finalize the installation.

 

Step 2) Install Miniconda with Detectron 2

To install miniconda with detectron2 and the detectron2-rpd-yb repo, run "install.bat".

image

After the bat file finishes, the setup is complete. By default, detectron2-rpd-yb (the repo) is located in the win-detectron2-rpd folder. You can now run the model.

 

Step 3) Running Detectron2-RPD

Before running the model, make sure to adjust the config file (options.ini) according to your needs. The example config file included with the installation:

image

 

VOL/DICOM EXTRACTION

run_extract (True/False): Extract images from your input files (.vol/.dicom).

input_dir: The path to the directory containing your vol/dicom files.

extracted_dir: The path to the directory where extracted images will be stored.

input_format (vol/dicom): The format of the input files, vol or dicom.

 

INFERENCE

dataset_name: The name of your dataset.

output_dir: The path to the directory where model predictions and other data will be stored.

run_inference (True/False): Run inference on extracted images. Note: Files must already be extracted!

create_tables (True/False): Create dataset html of model outputs. Note: Inference must already be done!

 

VISUAL OUTPUT

create_visuals (True/False): Create visualizations of model outputs. Note: Inference must already be done and bm/bmo/im flags set!

binary_mask (True/False): Output binary mask tif files. Note: create_visuals flag must be set to True!

binary_mask_overlay (True/False): Output binary mask overlay tif files. Note: create_visuals flag must be True!

instance_mask_overlay (True/False): Output instance mask overlay tif files. Note: create_visuals flag must be True!

 

To run the model, run Anaconda Prompt (miniconda3), which can be found on your computer using the Windows Search function.

In the prompt window, go to detectron2-rpd-yb/detectron2-rpd-pkg/src/detectron2-rpd/ (using cd).

Once inside the folder, run the following command to run the model:

python run_program.py --config %config%

%config% = path to your config file. This is required.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Dockerfile 0.6%