Download targets.py from bxding/RC1: direct link, hf CLI and curl.
- Browser
- Download file 889 Bytes
-
https://huggingface.co/bxding/RC1/resolve/main/targets.py
- Command line
-
hf download hf://bxding/RC1/targets.py
-
curl -L -o targets.py https://huggingface.co/bxding/RC1/resolve/main/targets.py
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) | |