Skip to main content

Microsoft COCO Caption Evaluation

Evaluation codes for MS COCO caption generation.

Description

This repository provides Python 3 support for the caption evaluation metrics used for the MS COCO dataset.

The code is derived from the original repository that supports Python 2.7: https://github.com/tylin/coco-caption.
Caption evaluation depends on the COCO API that natively supports Python 3.

Requirements

  • Java 1.8.0
  • Python 3

Installation

To install pycocoevalcap and the pycocotools dependency (https://github.com/cocodataset/cocoapi), run:

pip install pycocoevalcap

Usage

See the example script: example/coco_eval_example.py

Files

./

  • eval.py: The file includes COCOEavlCap class that can be used to evaluate results on COCO.
  • tokenizer: Python wrapper of Stanford CoreNLP PTBTokenizer
  • bleu: Bleu evalutation codes
  • meteor: Meteor evaluation codes
  • rouge: Rouge-L evaluation codes
  • cider: CIDEr evaluation codes
  • spice: SPICE evaluation codes

Setup

  • SPICE requires the download of Stanford CoreNLP 3.6.0 code and models. This will be done automatically the first time the SPICE evaluation is performed.
  • Note: SPICE will try to create a cache of parsed sentences in ./spice/cache/. This dramatically speeds up repeated evaluations. The cache directory can be moved by setting 'CACHE_DIR' in ./spice. In the same file, caching can be turned off by removing the '-cache' argument to 'spice_cmd'.

References

Developers

  • Xinlei Chen (CMU)
  • Hao Fang (University of Washington)
  • Tsung-Yi Lin (Cornell)
  • Ramakrishna Vedantam (Virgina Tech)

Acknowledgement

  • David Chiang (University of Norte Dame)
  • Michael Denkowski (CMU)
  • Alexander Rush (Harvard University)

Metadata

Release files for pycocoevalcap 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycocoevalcap 1.2
File Size Uploaded
pycocoevalcap-1.2.tar.gz 104.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycocoevalcap 1.2
File Interpreter ABI Platform
pycocoevalcap-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 208.6 MB

Release files / pycocoevalcap-1.2.tar.gz

Download URL pycocoevalcap-1.2.tar.gz
Size 104.3 MB
Tags Source
SHA-256 checksum
How to use checksums
7857f4d596ca2fa0b1a9a3c2067588a4257556077b7ad614d00b2b7b8f57cdde
BLAKE2b-256 checksum
How to use checksums
aed76b77c7cddc3832ec4c551633c787aeeda168cc2e0ff173649ce145f1b85c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0

Release files / pycocoevalcap-1.2-py3-none-any.whl

Download URL pycocoevalcap-1.2-py3-none-any.whl
Size 104.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
083ed7910f1aec000b0a237ef6665f74edf19954204d0b1cbdb8399ed132228d
BLAKE2b-256 checksum
How to use checksums
08f9466f289f1628296b5e368940f89e3cfcfb066d15ddc02ff536dc532b1c93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page