RC1 / targets.py
bxding's picture bd's picture
Release
db208b4
Raw History Blame Contribute Delete
889 Bytes
"""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)