Skip to content

Commit

Permalink
stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Yassine Benzakour committed Jun 13, 2024
1 parent 0c17d6d commit c159082
Show file tree
Hide file tree
Showing 94 changed files with 2,759 additions and 2,116 deletions.
35 changes: 17 additions & 18 deletions configs/_base_/datasets/json/features_clips.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# classes = ("Medical",)
classes = [
"Penalty",
"Kick-off",
Expand All @@ -18,16 +17,14 @@
"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'

dataset = dict(
input_fps = 25,
extract_fps = 2,
input_fps=25,
extract_fps=2,
train=dict(
type="FeatureClipsfromJSON",
path="train.json",
data_root = "/home/ybenzakour/datasets/SoccerNet/",
path="/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/train/annotations.json",
data_root="/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
window_size=20,
classes=classes,
Expand All @@ -36,11 +33,12 @@
batch_size=256,
shuffle=True,
pin_memory=True,
)),
),
),
valid=dict(
type="FeatureClipsfromJSON",
path="val.json",
data_root = "/home/ybenzakour/datasets/SoccerNet/",
path="/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/valid/annotations.json",
data_root="/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
window_size=20,
classes=classes,
Expand All @@ -49,21 +47,22 @@
batch_size=256,
shuffle=True,
pin_memory=True,
)),
),
),
test=dict(
type="FeatureVideosfromJSON",
path="test.json",
data_root = "/home/ybenzakour/datasets/SoccerNet/",
path="/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/test/annotations.json",
data_root="/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
window_size=20,
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,
)),
),
),
)
12 changes: 4 additions & 8 deletions configs/_base_/datasets/json/features_clips_CALF.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# classes = ("Medical",)
classes = [
"Penalty",
"Kick-off",
Expand All @@ -18,15 +17,13 @@
"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'

dataset = dict(
input_fps=25,
extract_fps=2,
train=dict(
type="FeatureClipChunksfromJson",
path="train.json",
path="/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/train/annotations.json",
data_root="/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
chunk_size=120,
Expand All @@ -42,7 +39,7 @@
),
valid=dict(
type="FeatureClipChunksfromJson",
path="val.json",
path="/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/valid/annotations.json",
data_root="/home/ybenzakour/datasets/SoccerNet/",
framerate=2,
chunk_size=120,
Expand All @@ -58,13 +55,12 @@
),
test=dict(
type="FeatureVideosChunksfromJson",
path="test.json",
path="/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/test/annotations.json",
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",
Expand Down
87 changes: 51 additions & 36 deletions configs/_base_/datasets/json/video_dali.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
classes = 'datasets_jsons/soccernetv2/2_fps/dali/class.txt'
classes = [
"Ball out of play",
"Clearance",
"Corner",
"Direct free-kick",
"Foul",
"Goal",
"Indirect free-kick",
"Kick-off",
"Offside",
"Penalty",
"Red card",
"Shots off target",
"Shots on target",
"Substitution",
"Throw-in",
"Yellow card",
"Yellow->red card",
]
dataset = dict(
epoch_num_frames = 500000,
mixup = True,
modality = 'rgb',
crop_dim = -1,
dilate_len = 0, # Dilate ground truth labels
clip_len = 100,
input_fps = 25,
extract_fps = 2,
epoch_num_frames=500000,
mixup=True,
modality="rgb",
crop_dim=-1,
dilate_len=0, # Dilate ground truth labels
clip_len=100,
input_fps=25,
extract_fps=2,
train=dict(
type="VideoGameWithDali",
classes=classes,
output_map = ["data", "label"],
path = "/home/ybenzakour/224p/train/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
output_map=["data", "label"],
path="/home/ybenzakour/224p/train/annotations.json", # path to label json
data_root="/home/ybenzakour/datasets/SoccerNet/",
dataloader=dict(
batch_size=8,
shuffle=True,
Expand All @@ -22,9 +40,9 @@
valid=dict(
type="VideoGameWithDali",
classes=classes,
output_map = ["data", "label"],
path = "/home/ybenzakour/224p/valid/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
output_map=["data", "label"],
path="/home/ybenzakour/224p/valid/annotations.json", # path to label json
data_root="/home/ybenzakour/datasets/SoccerNet/",
dataloader=dict(
batch_size=8,
shuffle=True,
Expand All @@ -33,43 +51,40 @@
valid_data_frames=dict(
type="VideoGameWithDaliVideo",
classes=classes,
output_map = ["data", "label"],
path = "/home/ybenzakour/224p/valid/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
overlap_len = 0,
output_map=["data", "label"],
path="/home/ybenzakour/224p/valid/annotations.json", # path to label json
data_root="/home/ybenzakour/datasets/SoccerNet/",
overlap_len=0,
dataloader=dict(
batch_size=4,
shuffle=False,
),
),
test = dict(
test=dict(
type="VideoGameWithDaliVideo",
classes=classes,
output_map = ["data", "label"],
path = "/home/ybenzakour/224p/test/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
split=["test"],
results = "results_spotting_test",
output_map=["data", "label"],
path="/home/ybenzakour/224p/test/annotations.json", # path to label json
data_root="/home/ybenzakour/datasets/SoccerNet/",
results="results_spotting_test",
# results = "pred-test.141.recall.json.gz",
nms_window = 2,
metric = "loose",
overlap_len = 50,
nms_window=2,
metric="loose",
overlap_len=50,
dataloader=dict(
batch_size=4,
shuffle=False,
),
),
challenge = dict(
challenge=dict(
type="VideoGameWithDaliVideo",
overlap_len = 50,
output_map = ["data", "label"],
path = "/home/ybenzakour/224p/challenge/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
overlap_len=50,
output_map=["data", "label"],
path="/home/ybenzakour/224p/challenge/annotations.json", # path to label json
data_root="/home/ybenzakour/datasets/SoccerNet/",
dataloader=dict(
batch_size=4,
shuffle=False,
),
)
),
)


21 changes: 19 additions & 2 deletions configs/_base_/datasets/json/video_ocv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
classes = 'datasets_jsons/soccernetv2/2_fps/dali/class.txt'
classes = [
"Ball out of play",
"Clearance",
"Corner",
"Direct free-kick",
"Foul",
"Goal",
"Indirect free-kick",
"Kick-off",
"Offside",
"Penalty",
"Red card",
"Shots off target",
"Shots on target",
"Substitution",
"Throw-in",
"Yellow card",
"Yellow->red card",
]

dataset = dict(
epoch_num_frames = 500000,
Expand Down Expand Up @@ -54,7 +72,6 @@
classes=classes,
path = "/home/ybenzakour/224p/test/annotations.json", # path to label json
data_root = "/home/ybenzakour/datasets/SoccerNet/",
split=["test"],
results = "results_spotting_test_ocv",
nms_window = 2,
metric = "loose",
Expand Down
8 changes: 4 additions & 4 deletions configs/_base_/datasets/soccernet/features_clips_CALF.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
data_root = '/home/ybenzakour/datasets/SoccerNet/'
classes = ("Penalty", "Kick-off", "Goal", "Substitution", "Offside",

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",)

"Yellow card","Red card", "Yellow->red card"]
data_root = '/home/ybenzakour/datasets/SoccerNet/'
dataset = dict(
train=dict(
type="SoccerNetClipsCALF",
Expand Down
7 changes: 0 additions & 7 deletions configs/_base_/models/contextawarelossfunction.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
model = dict(
type='ContextAware',
load_weights=None,
# input_size=512,
# num_classes=17,
# chunk_size=120,
# dim_capsule=16,
# receptive_field=40,
# num_detections=15,
# framerate=2,
backbone=dict(
type='PreExtactedFeatures',
encoder='ResNET_TF2_PCA512',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
_base_ = [
"../_base_/datasets/json/features_clips_CALF.py", # dataset config
"../_base_/models/contextawarelossfunction.py", # model config
"../_base_/schedules/calf_1000_adam.py", # trainer config
"../_base_/schedules/calf_1000_adam.py", # trainer config
]

work_dir = "outputs/contextawarelossfunction/json_soccernet_calf_resnetpca512"

dataset = dict(
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")
train=dict(
path=[
"/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/train/annotations.json"
],
data_root=["/home/ybenzakour/datasets/SoccerNet/"],
),
valid=dict(
path="/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/valid/annotations.json"
),
test=dict(
path="/home/ybenzakour/datasets/SoccerNet/JSON/ResNET_PCA512/test/annotations.json"
),
)
log_level = 'INFO' # The level of logging
log_level = "INFO" # The level of logging

runner = dict(
type="runner_JSON"
)
runner = dict(type="runner_JSON")

visualizer = dict(
threshold=0.0,
annotation_range=5000, # ms
seconds_to_skip=30,
scale=1.5,
)
)
24 changes: 24 additions & 0 deletions configs/learnablepooling/json_avgpool++_resnetpca512.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
_base_ = [
"../_base_/datasets/json/features_clips.py", # dataset config
"../_base_/models/learnablepooling.py", # model config
"../_base_/schedules/pooling_1000_adam.py" # trainer config
]

work_dir = "outputs/learnablepooling/json_avgpool++_resnetpca512"


log_level = 'INFO' # The level of logging
model = dict(
neck=dict(type='AvgPool++', output_dim=2*512, nb_frames=20*2,),
head=dict(input_dim=2*512)
)
runner = dict(
type="runner_JSON"
)

visualizer = dict(
threshold=0.0,
annotation_range=5000, # ms
seconds_to_skip=30,
scale=1.5,
)
24 changes: 24 additions & 0 deletions configs/learnablepooling/json_avgpool_resnetpca512.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
_base_ = [
"../_base_/datasets/json/features_clips.py", # dataset config
"../_base_/models/learnablepooling.py", # model config
"../_base_/schedules/pooling_1000_adam.py" # trainer config
]

work_dir = "outputs/learnablepooling/json_avgpool_resnetpca512"

log_level = 'INFO' # The level of logging


model = dict(
neck=dict(type='AvgPool', output_dim=512, nb_frames=20*2),
head=dict(input_dim=512)
)
runner = dict(
type="runner_JSON"
)
visualizer = dict(
threshold=0.0,
annotation_range=5000, # ms
seconds_to_skip=30,
scale=1.5,
)
Loading

0 comments on commit c159082

Please sign in to comment.