Skip to main content

Evaluation code for machine-generated image captions in Japanese.

Project description

JaSPICE - Japanese SPICE

Evaluation code for machine-generated image captions in Japanese.

This code also implemented a scene-graph parser for Japanese.

system

Instructions (using Docker)

Clone & Install

git clone git@github.com:keio-smilab23/JaSPICE.git
cd JaSPICE
pip install -e .

Build

docker build -t jaspice .

Run the docker container.

docker run -d -p 2115:2115 jaspice

Usage

from jaspice.api import JaSPICE

batch_size = 16
jaspice = JaSPICE(batch_size,server_mode=True)
_, score = jaspice.compute_score(references, candidates)

Instructions (without Docker)

Clone & Install

git clone git@github.com:keio-smilab23/JaSPICE.git
cd JaSPICE
pip install -e .

Install JUMAN, JUMAN++, KNP

  • juman : v7.01
  • juman++ : v1.02
  • knp : v4.20
# JUMAN++
wget 'http://nlp.ist.i.kyoto-u.ac.jp/DLcounter/lime.cgi?down=http://lotus.kuee.kyoto-u.ac.jp/nl-resource/jumanpp/jumanpp-1.02.tar.xz&name=jumanpp-1.02.tar.xz' 

# JUMAN
wget 'http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/juman/juman-7.01.tar.bz2' -O /tmp/juman.tar.bz2 

# KNP
wget 'https://nlp.ist.i.kyoto-u.ac.jp/DLcounter/lime.cgi?down=https://nlp.ist.i.kyoto-u.ac.jp/nl-resource/knp/knp-4.20.tar.bz2&name=knp-4.20.tar.bz2'

Usage

from jaspice.api import JaSPICE

batch_size = 16
jaspice = JaSPICE(batch_size,server_mode=False)
_, score = jaspice.compute_score(references, candidates)

Scene Graph Example

  • 「人通りの少なくなった道路で青いズボンを着た男の子がオレンジ色のヘルメットを被りスケートボードに乗っている.」

BibTex

@InProceedings{jaspice,
    title     = {JaSPICE: 日本語における述語項構造に基づく画像キャプション生成モデルの自動評価尺度},
    author = {和田唯我 and 兼田寛大 and 杉浦孔明},
    year      = {2023},
    booktitle = {言語処理学会第29回年次大会}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaspice-0.0.1.tar.gz (16.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page