File size: 889 Bytes
db208b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""Target names shared by training and torch-free inference."""

ALIASES = {
    "bicycles": "bicycle",
    "motorcycles": "motorcycle",
    "cars": "car",
    "bus": "bus",
    "buses": "bus",
    "crosswalks": "crosswalk",
    "a fire hydrant": "fire hydrant",
    "fire hydrants": "fire hydrant",
    "stairs": "stairs",
    "traffic lights": "traffic light",
    "bridges": "bridge",
    "tractors": "tractor",
    "taxis": "taxi",
    "hydrant": "fire hydrant",
    "stair": "stairs",
    "palm": "palm tree",
    "palm trees": "palm tree",
    "chimneys": "chimney",
    "parking meters": "parking meter",
    "mountains": "mountain",
    "mountains or hills": "mountain",
    "tlight": "traffic light",
}
# Folder images of this class contain none of the targets.
BACKGROUND = "other"


def target_name(value):
    value = value.strip().lower()
    return ALIASES.get(value, value)