-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopypaste_config.py
More file actions
41 lines (37 loc) · 1.36 KB
/
Copy pathcopypaste_config.py
File metadata and controls
41 lines (37 loc) · 1.36 KB
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
from augmentation_config import DATA_DIR, SOURCE_DATASETS, IMG_SUFFIXES
COPYPASTE_OUTPUT_DIR = DATA_DIR + "/goose_2d_train_copypaste"
# Class multipliers for Copy-Paste
# Number = how many target images to paste onto per source image
# (e.g., 10 means paste instances from this class onto 10 different target images)
COPYPASTE_CLASSES_CONFIG = {
'animal': 2,
'rider': 2,
'traffic_cone': 2,
'motorcycle': 2,
'container': 2,
'truck': 2,
'rail_track': 2,
'road_block': 2,
'barrier_tape': 2,
'tree_root': 2,
'tunnel': 2,
'bridge': 2,
'kick_scooter': 2,
'rock': 2,
'on_rails': 2,
'moss': 2,
'bikeway': 2,
}
# Class-specific scale ranges for Copy-Paste
# Format: (min_scale, max_scale) - instances will be randomly scaled within this range
# If a class is not listed here, it will use the global default from COPYPASTE_CONFIG
COPYPASTE_SCALE_RANGES = {
}
# Copy-Paste augmentation parameters
COPYPASTE_CONFIG = {
'num_pastes_per_image': 2, # How many instances to paste per target image
'blend_alpha': 1, # Blending factor (1.0 = full replacement, 0.2 = 20% blend)
'num_target_images_per_source': 1, # How many target images per source sample
'shuffle_classes': False, # Randomize class processing order
'scale_range': (0.2, 4), # Global default scale range for pasted instances (min, max)
}