Download code/strangebench/common/tree_utils.py from sidgairo18/strange-bench: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/datasets/sidgairo18/strange-bench/resolve/main/code/strangebench/common/tree_utils.py
- Command line
-
hf download hf://datasets/sidgairo18/strange-bench/code/strangebench/common/tree_utils.py
-
curl -L -o tree_utils.py https://huggingface.co/datasets/sidgairo18/strange-bench/resolve/main/code/strangebench/common/tree_utils.py
1.24 kB
| """Shared helpers: the COCO-80 class names and the form in which a tree path is written into metadata | |
| files. | |
| """ | |
| from __future__ import annotations | |
| import os | |
| COCO80 = [ | |
| "person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", | |
| "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", | |
| "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", | |
| "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", | |
| "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", | |
| "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", | |
| "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", | |
| "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "couch", | |
| "potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", | |
| "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", | |
| "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", | |
| "toothbrush", | |
| ] | |
| def mask_tree_path(p: str | os.PathLike) -> str: | |
| """Path as written into ``_strict_filter_meta.json`` and the ``stats.csv`` footer.""" | |
| return str(p) | |