Skip to content

Commit

Permalink
stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Yassine Benzakour committed May 27, 2024
1 parent 8d68620 commit 1046e17
Show file tree
Hide file tree
Showing 60 changed files with 1,322 additions and 826 deletions.
27 changes: 22 additions & 5 deletions configs/_base_/datasets/json/features_clips.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
# classes = ("Medical",)
classes = 'datasets_jsons/soccernetv2/features/class.txt'
classes = [
"Penalty",
"Kick-off",
"Goal",
"Substitution",
"Offside",
"Shots on target",
"Shots off target",
"Clearance",
"Ball out of play",
"Throw-in",
"Foul",
"Indirect free-kick",
"Direct free-kick",
"Corner",
"Yellow card",
"Red card",
"Yellow->red card",
]
# classes = 'datasets_jsons/soccernetv2/features/class.txt'
# classes = '/scratch/users/ybenzakour/zip/features/class.txt'
# classes = '/home/ybenzakour/datasets/SoccerNet/class.txt'
extension = '.mkv'
dataset = dict(
extension = extension,
input_fps = 25,
extract_fps = 2,
train=dict(
type="FeatureClipsfromJSON",
path="train.json",
data_root = ["/home/ybenzakour/datasets/SoccerNet/","/home/ybenzakour/datasets/SoccerNet/"],
data_root = "/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
window_size=20,
classes=classes,
Expand All @@ -20,7 +37,7 @@
shuffle=True,
pin_memory=True,
)),
val=dict(
valid=dict(
type="FeatureClipsfromJSON",
path="val.json",
data_root = "/home/ybenzakour/datasets/SoccerNet/",
Expand Down
50 changes: 35 additions & 15 deletions configs/_base_/datasets/json/features_clips_CALF.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
# classes = ("Medical",)
classes = 'datasets_jsons/soccernetv2/features/class.txt'
# classes = ("Medical",)
classes = [
"Penalty",
"Kick-off",
"Goal",
"Substitution",
"Offside",
"Shots on target",
"Shots off target",
"Clearance",
"Ball out of play",
"Throw-in",
"Foul",
"Indirect free-kick",
"Direct free-kick",
"Corner",
"Yellow card",
"Red card",
"Yellow->red card",
]
# classes = 'datasets_jsons/soccernetv2/features/class.txt'
# classes = '/scratch/users/ybenzakour/zip/features/class.txt'
# classes = '/home/ybenzakour/datasets/SoccerNet/class.txt'
extension = '.mkv'
dataset = dict(
extension = extension,
input_fps = 25,
extract_fps = 2,
input_fps=25,
extract_fps=2,
train=dict(
type="FeatureClipChunksfromJson",
path="train.json",
data_root = ["/home/ybenzakour/datasets/SoccerNet/","/home/ybenzakour/datasets/SoccerNet/"],
data_root="/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
chunk_size=120,
receptive_field=40,
Expand All @@ -21,11 +38,12 @@
batch_size=256,
shuffle=True,
pin_memory=True,
)),
val=dict(
),
),
valid=dict(
type="FeatureClipChunksfromJson",
path="val.json",
data_root = "/home/ybenzakour/datasets/SoccerNet/",
data_root="/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
chunk_size=120,
receptive_field=40,
Expand All @@ -36,23 +54,25 @@
batch_size=256,
shuffle=True,
pin_memory=True,
)),
),
),
test=dict(
type="FeatureVideosChunksfromJson",
path="test.json",
data_root = "/home/ybenzakour/datasets/SoccerNet/",
data_root="/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
chunk_size=120,
receptive_field=40,
chunks_per_epoch=6000,
split=["test"],
classes=classes,
metric = "loose",
results = "results_spotting_test",
metric="loose",
results="results_spotting_test",
dataloader=dict(
num_workers=1,
batch_size=1,
shuffle=False,
pin_memory=True,
)),
),
),
)
26 changes: 7 additions & 19 deletions configs/_base_/datasets/json/video_dali.py
Original file line number Diff line number Diff line change
@@ -1,49 +1,41 @@
classes = 'datasets_jsons/soccernetv2/2_fps/dali/class.txt'
extension = '.mkv'
dataset = dict(
batch_size = 8,
epoch_num_frames = 500000,
mixup = True,
modality = 'rgb',
crop_dim = -1,
dilate_len = 0, # Dilate ground truth labels
clip_len = 100,
extension = extension,
input_fps = 25,
extract_fps = 2,
train=dict(
type="VideoGameWithDali",
classes=classes,
output_map = ["data", "label"],
path = "datasets_jsons/soccernetv2/2_fps/dali/Train.json", # path to label json
path = "/home/ybenzakour/224p/train/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
stride = 12,
dataloader=dict(
batch_size=8,
shuffle=True,
),
),
val=dict(
valid=dict(
type="VideoGameWithDali",
classes=classes,
output_map = ["data", "label"],
stride = 12,
path = "datasets_jsons/soccernetv2/2_fps/dali/Valid.json", # path to label json
path = "/home/ybenzakour/224p/valid/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
extension = extension,
dataloader=dict(
batch_size=8,
shuffle=True,
),
),
val_data_frames=dict(
valid_data_frames=dict(
type="VideoGameWithDaliVideo",
classes=classes,
stride = 12,
output_map = ["data", "label"],
path = "datasets_jsons/soccernetv2/2_fps/dali/Valid.json", # path to label json
path = "/home/ybenzakour/224p/valid/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
extension = extension,
overlap_len = 0,
dataloader=dict(
batch_size=4,
Expand All @@ -52,12 +44,10 @@
),
test = dict(
type="VideoGameWithDaliVideo",
stride = 12,
classes=classes,
output_map = ["data", "label"],
path = "datasets_jsons/soccernetv2/2_fps/dali/Test.json", # path to label json
path = "/home/ybenzakour/224p/test/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
extension = extension,
split=["test"],
results = "results_spotting_test",
# results = "pred-test.141.recall.json.gz",
Expand All @@ -72,11 +62,9 @@
challenge = dict(
type="VideoGameWithDaliVideo",
overlap_len = 50,
stride = 12,
output_map = ["data", "label"],
path = "datasets_jsons/soccernetv2/2_fps/dali/Challenge.json", # path to label json
path = "/home/ybenzakour/224p/challenge/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
extension = extension,
dataloader=dict(
batch_size=4,
shuffle=False,
Expand Down
22 changes: 7 additions & 15 deletions configs/_base_/datasets/json/video_ocv.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
classes = 'datasets_jsons/soccernetv2/2_fps/dali/class.txt'
extension = '.mkv'

dataset = dict(
batch_size = 8,
epoch_num_frames = 500000,
mixup = True,
modality = 'rgb',
Expand All @@ -11,13 +9,11 @@
clip_len = 100,
input_fps = 25,
extract_fps = 2,
extension = extension,
train=dict(
type="VideoGameWithOpencv",
classes=classes,
path = "datasets_jsons/soccernetv2/2_fps/opencv/Train.json", # path to label json
path = "/home/ybenzakour/224p/train/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
stride = 12,
dataloader=dict(
num_workers=8,
batch_size=8,
Expand All @@ -26,12 +22,11 @@
prefetch_factor = 1,
),
),
val=dict(
valid=dict(
type="VideoGameWithOpencv",
classes=classes,
path = "datasets_jsons/soccernetv2/2_fps/opencv/Valid.json", # path to label json
path = "/home/ybenzakour/224p/valid/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
stride = 12,
dataloader=dict(
num_workers=8,
batch_size=8,
Expand All @@ -40,12 +35,11 @@
prefetch_factor = 1,
),
),
val_data_frames=dict(
valid_data_frames=dict(
type="VideoGameWithOpencvVideo",
classes=classes,
path = "datasets_jsons/soccernetv2/2_fps/opencv/Valid.json", # path to label json
path = "/home/ybenzakour/224p/valid/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
stride = 12,
overlap_len = 0,
dataloader=dict(
num_workers=8,
Expand All @@ -58,9 +52,8 @@
test = dict(
type="VideoGameWithOpencvVideo",
classes=classes,
path = "datasets_jsons/soccernetv2/2_fps/opencv/Test.json", # path to label json
path = "/home/ybenzakour/224p/test/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
stride = 12,
split=["test"],
results = "results_spotting_test_ocv",
nms_window = 2,
Expand All @@ -76,9 +69,8 @@
challenge = dict(
type="VideoGameWithOpencvVideo",
classes=classes,
path = "datasets_jsons/soccernetv2/2_fps/opencv/Challenge.json", # path to label json
path = "/home/ybenzakour/224p/challenge/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
stride = 12,
overlap_len = 50,
dataloader=dict(
num_workers=8,
Expand Down
2 changes: 1 addition & 1 deletion configs/_base_/datasets/soccernet/features_clips.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
shuffle=True,
pin_memory=True,
)),
val=dict(
valid=dict(
type="SoccerNetClips",
features="ResNET_TF2_PCA512.npy",
version=2,
Expand Down
2 changes: 1 addition & 1 deletion configs/_base_/datasets/soccernet/features_clips_CALF.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
shuffle=True,
pin_memory=True,
)),
val=dict(
valid=dict(
type="SoccerNetClipsCALF",
features="ResNET_TF2_PCA512.npy",
version=2,
Expand Down
6 changes: 3 additions & 3 deletions configs/_base_/schedules/e2e_100_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
type="trainer_e2e",
num_epochs = 100,
acc_grad_iter = 1,
base_num_val_epochs = 20,
start_val_epoch = None,
criterion_val = 'map',
base_num_valid_epochs = 20,
start_valid_epoch = None,
criterion_valid = 'map',
inference_batch_size = 4,
GPU = 1,
criterion = dict(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@
work_dir = "outputs/contextawarelossfunction/json_soccernet_calf_resnetpca512"

dataset = dict(
train=dict(path=['datasets_jsons/soccernetv2/features/Train.json',"datasets_jsons/soccernetv2/features/Valid.json"]),
val=dict(path="datasets_jsons/soccernetv2/features/Valid.json"),
train=dict(path='datasets_jsons/soccernetv2/features/Train.json'),
valid=dict(path="datasets_jsons/soccernetv2/features/Valid.json"),
test=dict(path="/scratch/users/ybenzakour/zip/features/Test.json")
)
log_level = 'INFO' # The level of logging

runner = dict(
type="runner_JSON"
)

visualizer = dict(
threshold=0.0,
annotation_range=5000, # ms
seconds_to_skip=30,
scale=1.5,
)
3 changes: 2 additions & 1 deletion configs/contextawarelossfunction/soccernet_resnetpca512.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

dataset = dict(
train=dict(features="ResNET_TF2_PCA512.npy"),
val=dict(features="ResNET_TF2_PCA512.npy"),
valid=dict(features="ResNET_TF2_PCA512.npy"),
test=dict(features="ResNET_TF2_PCA512.npy")
)
log_level = 'INFO' # The level of logging

# model = dict(
# neck=dict(
Expand Down
13 changes: 11 additions & 2 deletions configs/e2espot/e2espot.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
_base_ = [
"../_base_/datasets/json/video_dali.py", # dataset config
"../_base_/models/e2espot.py", # model config,
"../_base_/schedules/e2e_100_map.py", #trainer config
"../_base_/schedules/e2e_100_map.py", # trainer config
]

work_dir = "outputs/e2e/rny008_gsm_150"

dali = True
log_level = "INFO" # The level of logging

dali = True

visualizer = dict(
threshold=0.0,
annotation_range=5000, # ms
seconds_to_skip=30,
scale=1.5,
)
11 changes: 10 additions & 1 deletion configs/e2espot/e2espot_ocv.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,13 @@

work_dir = "outputs/e2e/rny008_gsm_150"

dali = False
log_level = 'INFO' # The level of logging

dali = False

visualizer = dict(
threshold=0.0,
annotation_range=5000, # ms
seconds_to_skip=30,
scale=1.5,
)
Loading

0 comments on commit 1046e17

Please sign in to comment.