Skip to content

Latest commit

 

History

History
75 lines (62 loc) · 3.67 KB

File metadata and controls

75 lines (62 loc) · 3.67 KB

Procedure to Execute Experiments

Note

Only the procedures to train, batch-wise sample, and test the embedding network are included below. The remainder of the execution procedure is yet to be documented, but follows a similar workflow and can be retraced through the modularly structured pluggable portions and the commented lines in run.py.

Clone the repository and set up the Python environment

  • This implementation used anaconda for managing libraries, and the environment can be reproduced using the dependency file: dependencies.yml.
  • For instance, to clone the dependencies into a new environment, use,
    conda env create -f dependencies.yml
    
  • Alternatively, use pip manager to install the dependencies from the dependencies.txt](./dependencies.txt) file.
    pip install -r dependencies.txt
    

Further References

Train the Embedding Network

Keeping all parameters fixed, and using the default architecture for the underlying network, the following steps will train the embedding network.

Note

  • Activate the conda environment set up in the previous stage.

    conda activate skin_fsl
    
  • Navigate to Skin-FSL/prototypical/Experiments/src.

  • Edit run.py and uncomment the line to call the trainer. The line is a function call like so: trainer.train().

    • To edit the file on a CLI interface, nano editor is a convenient option.
      nano run.py    (to open the file in nano editor)
      ctrl+o         (to save changes)
      ctrl+x         (to close the editor)
      
  • Execute run.py (not context-sensitive).

    python run.py
    
  • The following is a sample output when running the training experiment.

Test the Embedding Network

Note

  • The model state for evaluation is set by default. To change this, change the value assigned to variable model_path in src/prototypical/tester_exhaustive.py.
  • To test on a different dataset, the dataset interfacing classes need to be defined according to the data files structure. See the class for ISIC 2018 data, for instance.
  • Activate the conda environment set up in the previous stage.

    conda activate skin_fsl
    
  • Navigate to Skin-FSL/prototypical/Experiments/src.

  • Edit run.py and uncomment the line to call the tester. The line is a function call like so: tester_exhaustive.test().

    • To edit the file on a CLI interface, nano editor is a convenient option.
      nano run.py    (to open the file in nano editor)
      ctrl+o         (to save changes)
      ctrl+x         (to close the editor)
      
  • Execute run.py (not context-sensitive).

    python run.py
    
  • The following is a sample output when running a test on the trained network.