Skip to content

Commit

Permalink
Evaluate script: review of command-line arguments (#172)
Browse files Browse the repository at this point in the history
* move eval params to config (WIP)

* follow train CLI: add debugger options, add experiment name, use score_threshold from config

* fix prettier

* edit CLI defaults and get dataset params from ckpt if not defined (WIP)

* fix ninja comma

* Add sections to config

* Rename to evaluate utils

* Match current train script and add slurm logs as artifacts

* Fix evaluate_utils

* Use config from ckpt if not passed. Use dataset, annot files and seed from ckpt if not passed.

* Clarify CLI help (hopefully)

* Add score threshold for visualisation as CLI argument

* Small fix to config yaml

* Clean up

* Fix save frames and add output_dir

* Fix tests

* Move get_ functions to evaluate utils

* Replace assert by try-except
  • Loading branch information
sfmig committed Jul 8, 2024
1 parent a805122 commit e8a2bca
Show file tree
Hide file tree
Showing 8 changed files with 434 additions and 193 deletions.
32 changes: 27 additions & 5 deletions crabs/detection_tracking/config/faster_rcnn.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Dataset
#-------------
train_fraction: 0.8
val_over_test_fraction: 0.5
num_workers: 4

# -------------------
# Model architecture
# -------------------
num_classes: 2

# -------------------------------
# Training & validation parameters
# -------------------------------
n_epochs: 250
learning_rate: 0.00005
wdecay: 0.00005
batch_size_train: 4
batch_size_test: 4
batch_size_val: 4
num_classes: 2
train_fraction: 0.8
val_over_test_fraction: 0.5
checkpoint_saving:
every_n_epochs: 50
keep_last_n_ckpts: 5
Expand All @@ -17,8 +27,16 @@ checkpoint_saving:
# if all, all checkpoints for every epoch are added as artifacts during training,
# if False, no checkpoints are added as artifacts.
save_last: True

# -----------------------
# Evaluation parameters
# -----------------------
iou_threshold: 0.1
num_workers: 4
batch_size_test: 4

# -------------------
# Data augmentation
# -------------------
transform_brightness: 0.5
transform_hue: 0.3
gaussian_blur_params:
Expand All @@ -28,6 +46,10 @@ gaussian_blur_params:
sigma:
- 0.1
- 5.0

# ----------------------------
# Hyperparameter optimisation
# -----------------------------
# when we run Optuna, the n_trials and n_epochs above will be overwritten by the parameters set by Optuna
optuna:
# Parameters for hyperparameter optimisation with Optuna:
Expand Down
97 changes: 0 additions & 97 deletions crabs/detection_tracking/evaluate.py

This file was deleted.

Loading

0 comments on commit e8a2bca

Please sign in to comment.