Skip to content

Commit

Permalink
Add variables for default config paths
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Nov 12, 2024
1 parent 4b77a54 commit 78c53b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crabs/detector/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
log_data_augm_as_artifacts,
)

DEFAULT_DETECTOR_CONFIG = str(
Path(__file__).parent / "config" / "faster_rcnn.yaml"
)


class DetectorTrain:
"""Training class for detector algorithm.
Expand Down Expand Up @@ -300,7 +304,7 @@ def train_parse_args(args):
parser.add_argument(
"--config_file",
type=str,
default=str(Path(__file__).parent / "config" / "faster_rcnn.yaml"),
default=DEFAULT_DETECTOR_CONFIG,
help=(
"Location of YAML config to control training. "
"Default: "
Expand Down
6 changes: 5 additions & 1 deletion crabs/tracker/track_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
format_and_filter_bbox_predictions_for_sort,
)

DEFAULT_TRACKING_CONFIG = str(
Path(__file__).parent / "config" / "tracking_config.yaml"
)


class Tracking:
"""Interface for detecting and tracking crabs on a video.
Expand Down Expand Up @@ -349,7 +353,7 @@ def tracking_parse_args(args):
parser.add_argument(
"--config_file",
type=str,
default=str(Path(__file__).parent / "config" / "tracking_config.yaml"),
default=DEFAULT_TRACKING_CONFIG,
help=(
"Location of YAML config to control tracking. "
"Default: "
Expand Down

0 comments on commit 78c53b9

Please sign in to comment.