forked from deepdrivepl/SegTrackDetect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
66 lines (58 loc) · 2.73 KB
/
__init__.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from .unet import *
from .u2net import *
"""
ESTIMATOR_MODELS
A dictionary that maps model names to their respective ROI estimator configurations.
Keys:
str: Model names (e.g., "MTSD", "ZeF20", "SDS_tiny", "DC_small").
Values:
type: The corresponding ROI estimator configuration, which includes:
- MTSD: ROI estimator configuration for Mapillary Traffic Sign Dataset.
- ZeF20: ROI estimator configuration for ZebraFish detection model.
- SDS_tiny: SeaDronesSee ROI model configuration with tiniest input size during training (check `unet.py` for details).
- SDS_small: SeaDronesSee ROI model configuration with small input size during training (check `unet.py` for details).
- SDS_medium: SeaDronesSee ROI model configuration with medium input size during training (check `unet.py` for details).
- SDS_large: SeaDronesSee ROI model configuration with large input size during training (check `unet.py` for details).
- DC_tiny: DroneCrowd ROI model configuration with tiny input size during training (check `unet.py` for details).
- DC_small: DroneCrowd ROI model configuration with small input size during training (check `unet.py` for details).
- DC_medium: DroneCrowd ROI model configuration with medium input size during training (check `unet.py` for details).
Usage:
Access the model configuration by referring to its corresponding model name. For example:
model_config = ESTIMATOR_MODELS["MTSD"]
You can add custom models by defining them in the respective module files, then use them for inference in your applications. For example:
CustomModel = dict(
weights = "weights/my_custom_model_weights.pt",
in_size = (512, 512),
thresh = 0.5,
args = None,
sigmoid_included = True,
dilate = False,
k_size = 3,
iter = 1,
transform = my_transform_function,
postprocess = my_postprocess_function,
)
ESTIMATOR_MODELS = {
"MTSD": MTSD,
"ZeF20": ZeF20,
"SDS_tiny": SeaDronesSee_tiny,
"SDS_small": SeaDronesSee_small,
"SDS_medium": SeaDronesSee_medium,
"SDS_large": SeaDronesSee_large,
"DC_tiny": DroneCrowd_tiny,
"DC_small": DroneCrowd_small,
"DC_medium": DroneCrowd_medium,
"CUSTOM": CustomModel,
}
"""
ESTIMATOR_MODELS = {
"MTSD": MTSD,
"ZeF20": ZeF20,
"SDS_tiny": SeaDronesSee_tiny,
"SDS_small": SeaDronesSee_small,
"SDS_medium": SeaDronesSee_medium,
"SDS_large": SeaDronesSee_large,
"DC_tiny": DroneCrowd_tiny,
"DC_small": DroneCrowd_small,
"DC_medium": DroneCrowd_medium,
}