-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.sh
52 lines (43 loc) · 1.83 KB
/
constants.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# This file contains project-wide variables.
export PROJECT_DIR="/ocean/projects/hum210002p"
export ACCOUNT="hum210002p"
# Bridges-2 specific:
export CONDA_INIT_SCRIPT="/opt/packages/anaconda3/etc/profile.d/conda.sh"
# Directory with all our environments. E.g.: `conda activate ${CONDA_SHUFFLER_ENV}`
export CONDA_ENV_DIR="${PROJECT_DIR}/shared/conda/envs"
export CONDA_SHUFFLER_ENV="${CONDA_ENV_DIR}/shuffler"
export CONDA_YOLOV5_ENV="${CONDA_ENV_DIR}/yolov5"
export CONDA_OLTR_ENV="${CONDA_ENV_DIR}/OpenLongTailRecognition-OLTR"
export CONDA_POLYGON_YOLOV5_ENV="${CONDA_ENV_DIR}/PolygonObjectDetection"
export CONDA_PEL_ENV="${CONDA_ENV_DIR}/pel"
# ---- Code ---- #
# Directory with Shuffler code,
export SHUFFLER_DIR="${PROJECT_DIR}/shared/src/ml4docs/shuffler"
# Directory with YoloV5 code.
export YOLOV5_DIR="${PROJECT_DIR}/shared/src/ml4docs/yolov5"
# Directory with OLTR code.
export OLTR_DIR="${PROJECT_DIR}/shared/src/ml4docs/OpenLongTailRecognition-OLTR"
# Directory with PolygonYoloV5 code.
export POLYGON_YOLOV5_DIR="${PROJECT_DIR}/shared/src/ml4docs/PolygonObjectDetection"
# Directory with PEL code.
export PEL_DIR="${PROJECT_DIR}/shared/src/ml4docs/pel"
# ---- Data ---- #
# All databases reside here.
export DATABASES_DIR="${PROJECT_DIR}/shared/databases"
# Labelme data resides here.
export LABELME_DIR="${PROJECT_DIR}/shared/data"
# Used by Shuffler to determine argument "rootdir".
export ROOT_DIR="${PROJECT_DIR}/shared/data"
# Detection results reside here.
export DETECTION_DIR="${PROJECT_DIR}/shared/detection"
# Detection results reside here.
export CLASSIFICATION_DIR="${PROJECT_DIR}/shared/classification"
export LABELME_USER="tsukeyoka"
log_db_version() {
local campaign_id=$1
local version=$2
local text=$3
echo "v${version} $(date): ${text}
" >> "${DATABASES_DIR}/campaign${campaign_id}/versions.log"
}