Skip to content

Commit af80fbd

Browse files
authored
Update README.md
1 parent 0eb8557 commit af80fbd

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ Preprint on BioRxiv: [https://doi.org/10.1101/2024.04.03.587987]( https://doi.or
3636
pip install bioencoder
3737
````
3838

39-
2\. Download example dataset from the data repo: [https://zenodo.org/records/10909614/files/BioEncoder-data.zip](https://zenodo.org/records/10909614/files/BioEncoder-data.zip?download=1&preview=1).
40-
This archive contains the images and configuration files needed for step 3/4, as well as the final model checkpoints and a script to reproduce the results and figures presented in the paper. To play around with the interactive figures and the model explorer you can also skip the training / SWA steps.
39+
2\. Get the [example dataset from the data repo](https://zenodo.org/records/13017212/files/BioEncoder-dataset.zip?download=1) and the config files by [downloading the git repo](https://github.com/agporto/BioEncoder/archive/refs/heads/main.zip), and extract both.
4140

4241
3\. Start interactive session (e.g., in Spyder or VS code) and run the following commands one by one:
4342

@@ -46,13 +45,13 @@ This archive contains the images and configuration files needed for step 3/4, as
4645

4746
import bioencoder
4847

49-
## global setup
50-
bioencoder.configure(root_dir=r"~/bioencoder_wd", run_name="v1")
48+
## global setup (pick a target directory for all output that bioencoder generates, e.g. training dataset, model weights, etc.)
49+
bioencoder.configure(root_dir=r"bioencoder_wd", run_name="v1")
5150

52-
## split dataset
53-
bioencoder.split_dataset(image_dir=r"~/Downloads/damselflies-aligned-trai_val", max_ratio=6, random_seed=42, val_percent=0.1, min_per_class=20)
51+
## split dataset (the dataset you downloaded)
52+
bioencoder.split_dataset(image_dir=r"damselflies-aligned-trai_val", max_ratio=6, random_seed=42, val_percent=0.1, min_per_class=20)
5453

55-
## train stage 1
54+
## train stage 1
5655
bioencoder.train(config_path=r"bioencoder_configs/train_stage1.yml")
5756
bioencoder.swa(config_path=r"bioencoder_configs/swa_stage1.yml")
5857

@@ -80,7 +79,7 @@ bioencoder.inference(config_path="bioencoder_configs/inference.yml", image="path
8079
## use the flag "--overwrite" to redo a step
8180

8281
bioencoder_configure --root-dir "~/bioencoder_wd" --run-name v1
83-
bioencoder_split_dataset --image-dir "~/Downloads/damselflies-aligned-trai_val" --max-ratio 6 --random-seed 42
82+
bioencoder_split_dataset --image-dir "damselflies-aligned-trai_val" --max-ratio 6 --random-seed 42
8483
bioencoder_train --config-path "bioencoder_configs/train_stage1.yml"
8584
bioencoder_swa --config-path "bioencoder_configs/swa_stage1.yml"
8685
bioencoder_interactive_plots --config-path "bioencoder_configs/plot_stage1.yml"

0 commit comments

Comments
 (0)