-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from cimat-ris/use_config_files
Use config files
- Loading branch information
Showing
60 changed files
with
2,210 additions
and
2,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,3 +131,6 @@ dmypy.json | |
# Dataset related | ||
*sdd_raw* | ||
*.pickle | ||
*.pth | ||
*.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
dataset: | ||
pickle_dir: 'pickle/' | ||
validation_proportion: 0.1 | ||
use_neighbors: False | ||
batch_size: 256 | ||
person_max: 70 # Maximum number of persons in a frame | ||
obs_len: 8 # Observation length (trajlet size) | ||
pred_len: 12 # Prediction length | ||
delim: "," # Delimiter | ||
dt: 0.4 # Delta time (time between two discrete time samples) | ||
max_overlap: 1 # Maximal overlap between trajets | ||
model: | ||
num_layers: 2 | ||
dropout_rate: 0.2 | ||
hidden_dim: 128 | ||
embedding_dim: 128 | ||
input_dim: 2 | ||
output_dim: 2 | ||
train: | ||
initial_lr: 0.001 | ||
epochs: 220 #220 | ||
no_retrain: False | ||
teacher_forcing: False | ||
save_dir : "training_checkpoints/" | ||
model_name: "deterministic" | ||
misc: | ||
plot_losses: True | ||
plot_dir: "images/" | ||
show_test: False | ||
samples_test: 10 | ||
model_samples: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
dataset: | ||
id_dataset: 0 # 0: ETHUCY | ||
id_test: 2 | ||
pickle: False | ||
pickle_dir: 'pickle/' | ||
validation_proportion: 0.1 | ||
use_neighbors: False | ||
batch_size: 512 | ||
person_max: 70 # Maximum number of persons in a frame | ||
obs_len: 8 # Observation length (trajlet size) | ||
pred_len: 12 # Prediction length | ||
delim: "," # Delimiter | ||
dt: 0.4 # Delta time (time between two discrete time samples) | ||
max_overlap: 1 # Maximal overlap between trajets | ||
model: | ||
num_layers: 2 | ||
dropout_rate: 0.2 | ||
hidden_dim: 128 | ||
embedding_dim: 8 | ||
input_dim: 2 | ||
output_dim: 2 | ||
train: | ||
initial_lr: 0.001 | ||
epochs: 800 | ||
no_retrain: False | ||
teacher_forcing: False | ||
save_dir : "training_checkpoints/" | ||
model_name: "deterministic" | ||
misc: | ||
plot_losses: True | ||
plot_dir: "images/" | ||
show_test: True | ||
samples_test: 10 | ||
log_level: 20 | ||
seed: 1234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
dataset: | ||
pickle_dir: 'pickle/' | ||
validation_proportion: 0.1 | ||
use_neighbors: True | ||
batch_size: 256 | ||
person_max: 70 # Maximum number of persons in a frame | ||
obs_len: 8 # Observation length (trajlet size) | ||
pred_len: 12 # Prediction length | ||
delim: "," # Delimiter | ||
dt: 0.4 # Delta time (time between two discrete time samples) | ||
max_overlap: 1 # Maximal overlap between trajets | ||
model: | ||
num_layers: 2 | ||
dropout_rate: 0.2 | ||
hidden_dim: 128 | ||
embedding_dim: 128 | ||
input_dim: 2 | ||
output_dim: 2 | ||
train: | ||
initial_lr: 0.001 | ||
epochs: 220 | ||
no_retrain: False | ||
teacher_forcing: False | ||
save_dir : "training_checkpoints/" | ||
model_name: "deterministic_gaussian" | ||
misc: | ||
plot_losses: False | ||
plot_dir: "images/" | ||
show_test: False | ||
samples_test: 10 | ||
model_samples: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
dataset: | ||
id_dataset: 1 # 0: ETHUCY | ||
id_test: 2 | ||
pickle: True | ||
pickle_dir: 'pickle/' | ||
validation_proportion: 0.1 | ||
use_neighbors: False | ||
batch_size: 256 | ||
person_max: 70 # Maximum number of persons in a frame | ||
obs_len: 8 # Observation length (trajlet size) | ||
pred_len: 12 # Prediction length | ||
delim: "," # Delimiter | ||
dt: 0.4 # Delta time (time between two discrete time samples) | ||
max_overlap: 1 # Maximal overlap between trajets | ||
model: | ||
num_layers: 2 | ||
dropout_rate: 0.2 | ||
hidden_dim: 128 | ||
embedding_dim: 128 | ||
input_dim: 2 | ||
output_dim: 2 | ||
train: | ||
initial_lr: 0.001 | ||
epochs: 1 #220 | ||
no_retrain: True | ||
teacher_forcing: False | ||
save_dir : "training_checkpoints/" | ||
model_name: "deterministic_gaussian" | ||
misc: | ||
plot_losses: False | ||
plot_dir: "images/" | ||
show_test: True | ||
samples_test: 10 | ||
log_level: 20 | ||
seed: 1234 | ||
model_samples: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
dataset: | ||
id_dataset: 0 # 0: ETHUCY | ||
id_test: 2 | ||
pickle: False | ||
pickle_dir: 'pickle/' | ||
validation_proportion: 0.1 | ||
use_neighbors: False | ||
batch_size: 256 | ||
person_max: 70 # Maximum number of persons in a frame | ||
obs_len: 8 # Observation length (trajlet size) | ||
pred_len: 12 # Prediction length | ||
delim: "," # Delimiter | ||
dt: 0.4 # Delta time (time between two discrete time samples) | ||
max_overlap: 1 # Maximal overlap between trajets | ||
model: | ||
num_layers: 2 | ||
dropout_rate: 0.2 | ||
hidden_dim: 128 | ||
embedding_dim: 128 | ||
input_dim: 2 | ||
output_dim: 2 | ||
train: | ||
initial_lr: 0.001 | ||
epochs: 2 #220 | ||
num_mctrain: 10 | ||
no_retrain: False | ||
teacher_forcing: False | ||
save_dir : "training_checkpoints/" | ||
model_name: "deterministic_variational" | ||
misc: | ||
plot_losses: True | ||
plot_dir: "images/" | ||
show_test: True | ||
samples_test: 10 | ||
log_level: 20 | ||
seed: 1234 | ||
model_samples: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import os, sys | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
|
||
from opentraj.loaders.loader_edinburgh import load_edinburgh | ||
sys.path.append('.') | ||
|
||
months = { | ||
#'Jan' : {'01','02','04','05','06','07','08','10','11','12','13','14','15','16','17','18','19'}, | ||
#'May' : {'29','30','31'}, | ||
#'Jun' : {'02','03','04','05','06','08','09','11','12','14','16','17','18','20','22','24','25','26','29','30'}, | ||
#'Jul' : {'01','02','04','11','12','13','14','17','18','19','20','21','22','23','25','26','27','28','29','30'}, | ||
#'Aug' : {'01','24','25','26','27','28','29','30'}, | ||
'Sep' : {'01','02','04','05','06','10','11','12','13','14','16','18','19','20','21','22','23','24','25','27','28','29','30'}, | ||
'Oct': {'02','03','04','05','06','07','08','09','10','11','12','13','14','15'}, | ||
'Dec' : {'06','11','14','15','16','18','19','20','21','22','23','24','29','30','31'} | ||
} | ||
# Fixme: set proper OpenTraj directory | ||
edi_root = os.path.join('../../../OpenTraj', 'datasets', 'Edinburgh','annotations') | ||
edi_data = {key: pd.DataFrame() for key in months.keys() } | ||
|
||
for month, videos_per_month in months.items(): | ||
scene_video_ids = [day+month for day in videos_per_month] | ||
traj_datasets_per_scene = [] | ||
|
||
for scene_video_id in scene_video_ids: | ||
annot_file = os.path.join(edi_root,'tracks.'+scene_video_id+'.txt') | ||
print(annot_file) | ||
itraj_dataset = load_edinburgh(annot_file, title="Edinburgh", | ||
use_kalman=False, scene_id=scene_video_id, sampling_rate=4) # original framerate=9 | ||
trajs = list(itraj_dataset.get_trajectories()) | ||
traj_datasets_per_scene.append(pd.concat([itraj_dataset.data.iloc[:, : 4], itraj_dataset.data.iloc[:, 8:9]], axis=1)) | ||
|
||
if len(traj_datasets_per_scene)>0: | ||
df = pd.concat(traj_datasets_per_scene) | ||
df.to_pickle(month+'.pickle') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.