Download eval/coco_caption/pycocoevalcap/test.py from datnguyentien204/BLIP_ImagesCaptioning: direct link, hf CLI and curl.
- Browser
- Download file 247 Bytes
-
https://huggingface.co/datasets/datnguyentien204/BLIP_ImagesCaptioning/resolve/main/eval/coco_caption/pycocoevalcap/test.py
- Command line
-
hf download hf://datasets/datnguyentien204/BLIP_ImagesCaptioning/eval/coco_caption/pycocoevalcap/test.py
-
curl -L -o test.py https://huggingface.co/datasets/datnguyentien204/BLIP_ImagesCaptioning/resolve/main/eval/coco_caption/pycocoevalcap/test.py
247 Bytes
| from tokenizer.ptbtokenizer import PTBTokenizer | |
| tokenizer = PTBTokenizer() | |
| gts = {"annotations": [{"image_id": 184613, "caption": "A child holding a flowered umbrella and petting a yak.", "id": 474921}]} | |
| gts = tokenizer.tokenize(gts) | |
| print(gts) | |