Graduation_Project/QN/RecipeRetrieval/config/config.yaml

159 lines
4.6 KiB
YAML

data:
image_orig_dims:
height: null
width: null
image_resize_dims:
height: null
width: null
data_dir: null
video_dir: null
csv_file: CollectedData.csv
downsample_factor: 2
columns_for_singleview_pca: null
training:
imgaug: dlc
# batch size of labeled data during training
train_batch_size: 16
# batch size of labeled data during validation
val_batch_size: 32
# batch size of labeled data during test
test_batch_size: 32
# fraction of labeled data used for training
train_prob: 0.95
# fraction of labeled data used for validation (remaining used for test)
val_prob: 0.05
# <=1 - fraction of total train frames (determined by `train_prob`) used for training
# >1 - number of total train frames used for training
train_frames: 1
# number of gpus to train a single model
num_gpus: 1
# number of cpu workers for data loaders
num_workers: 4
# epochs over which to assess validation metrics for early stopping
early_stop_patience: 3
# epoch at which backbone network weights begin updating
unfreezing_epoch: 20
# max training epochs; training may exit before due to early stopping
min_epochs: 300
max_epochs: 300
# save model weights every n epochs; must be divisible by check_val_every_n_epoch below
# if null, only best weights will be saved after training
ckpt_every_n_epochs: null
# frequency to log training metrics (one step is one batch)
log_every_n_steps: 10
# frequency to log validation metrics
check_val_every_n_epoch: 5
# select gpu for training
gpu_id: 0
# rng seed for labeled batches
rng_seed_data_pt: 0
# rng seed for weight initialization
rng_seed_model_pt: 0
# learning rate scheduler
# multisteplr | [todo - reducelronplateau]
lr_scheduler: multisteplr
lr_scheduler_params:
multisteplr:
milestones: [150, 200, 250]
gamma: 0.5
model:
losses_to_use: []
# backbone network:
# resnet18 | resnet34 | resnet50 | resnet101 | resnet152 | resnet50_contrastive
# resnet50_animal_apose | resnet50_animal_ap10k
# resnet50_human_jhmdb | resnet50_human_res_rle | resnet50_human_top_res | resnet50_human_hand
# efficientnet_b0 | efficientnet_b1 | efficientnet_b2
# vit_b_sam | vit_h_sam
backbone: resnet50_animal_ap10k
# prediction mode: regression | heatmap | heatmap_mhcrnn (context)
model_type: heatmap
# which heatmap loss to use
# mse | kl | js
heatmap_loss_type: mse
# directory name for model saving
model_name: test
# load model from checkpoint
checkpoint: null
dali:
general:
seed: 123456
base:
train:
sequence_length: 32
predict:
sequence_length: 96
context:
train:
batch_size: 16
predict:
sequence_length: 96
losses:
triplet:
log_weight: 5.0
# predictions should lie within the low-d subspace spanned by these components
components_to_keep: 3
# absolute error (in pixels) below which pca loss is zeroed out; if null, an empirical
# epsilon is computed using the labeled data
epsilon: null
# loss = projection onto the discarded eigenvectors
temporal:
# weight in front of temporal loss
log_weight: 5.0
# for epsilon insensitive rectification
# (in pixels; diffs below this are not penalized)
epsilon: 20.0
# nan removal value.
# (in prob; heatmaps with max prob values are removed)
prob_threshold: 0.05
eval:
# paths to the hydra config files in the output folder, OR absolute paths to such folders.
# used in scripts/predict_new_vids.py and scripts/create_fiftyone_dataset.py
hydra_paths: [" "]
# predict? used in scripts/train_hydra.py
predict_vids_after_training: true
# save labeled .mp4? used in scripts/train_hydra.py and scripts/predict_new_vids.py
save_vids_after_training: false
fiftyone:
# will be the name of the dataset (Mongo DB) created by FiftyOne. for video dataset, we will append dataset_name + "_video"
dataset_name: test
# if you want to manually provide a different model name to be displayed in FiftyOne
model_display_names: ["test_model"]
# whether to launch the app from the script (True), or from ipython (and have finer control over the outputs)
launch_app_from_script: false
remote: true # for LAI, must be False
address: 127.0.0.1 # ip to launch the app on.
port: 5151 # port to launch the app on.
test_videos_directory: null
confidence_thresh_for_vid: 0.90
callbacks:
anneal_weight:
attr_name: total_unsupervised_importance
init_val: 0.0
increase_factor: 0.01
final_val: 1.0
freeze_until_epoch: 0
hydra:
run:
dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
sweep:
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
subdir: ${hydra.job.num}