{"id":20623242,"url":"https://github.com/soskek/captioning_chainer","last_synced_at":"2025-10-04T01:55:19.984Z","repository":{"id":113372325,"uuid":"106174558","full_name":"soskek/captioning_chainer","owner":"soskek","description":"A fast implementation of Neural Image Caption by Chainer","archived":false,"fork":false,"pushed_at":"2018-08-09T12:13:50.000Z","size":23,"stargazers_count":16,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T12:47:18.185Z","etag":null,"topics":["beam-search","chainer","image-captioning","neural-networks","rnn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soskek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-08T12:30:01.000Z","updated_at":"2024-01-04T16:17:46.000Z","dependencies_parsed_at":"2023-06-15T11:30:40.063Z","dependency_job_id":null,"html_url":"https://github.com/soskek/captioning_chainer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soskek/captioning_chainer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fcaptioning_chainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fcaptioning_chainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fcaptioning_chainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fcaptioning_chainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soskek","download_url":"https://codeload.github.com/soskek/captioning_chainer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soskek%2Fcaptioning_chainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254462,"owners_count":25956599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beam-search","chainer","image-captioning","neural-networks","rnn"],"created_at":"2024-11-16T12:26:26.546Z","updated_at":"2025-10-04T01:55:19.951Z","avatar_url":"https://github.com/soskek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Captioning by Chainer\n\nA Chainer implementation of [Neural Image Caption](https://www.cv-foundation.org/openaccess/content_cvpr_2015/papers/Vinyals_Show_and_Tell_2015_CVPR_paper.pdf), which generates captions given images.\n\nThis implementation is fast, because it uses cudnn-based LSTM (NStepLSTM) and beam search can deal with batch processing.\n\nThis code uses the [coco-caption](https://github.com/tylin/coco-caption) as a submodule.\nSo, please clone this repository as follows:\n```\ngit clone --recursive https://github.com/soskek/captioning_chainer.git\n```\n\nFurthermore, the [coco-caption](https://github.com/tylin/coco-caption) works on python 2.7 only. Thus, this repository also follows it.\n\n\n## Train an Image Caption Generator\n\n```\nsh prepare_scripts/prepare_dataset.sh\n```\n\n```\n# flickr8k, flickr30k, mscoco\npython -u train.py -g 0 --vocab data/flickr8k/vocab.txt --dataset flickr8k -b 64\npython -u train.py -g 0 --vocab data/flickr30k/vocab.txt --dataset flickr30k -b 64\npython -u train.py -g 0 --vocab data/coco/vocab.txt --dataset mscoco -b 64\n```\n\nOn the mscoco dataset, with beam size of 20, a trained model reached BELU 25.9.\nThe paper uses ensemble and (unwritten) hyperparameters, which can cause the gap between this and the value reported in the paper.\n\n## Use the model\n\n```\npython interactive.py --resume result/best_model.npz --vocab data/flickr8k/vocab.txt\n```\n\nAfter launched, enter the path of an image file.\n\n\n## See Best Result and Plot Curve\n\n```\npython get_best.py --log result/log\n```\n\n\n## Citation\n\n```\n@article{Vinyals2015ShowAT,\n  title={Show and tell: A neural image caption generator},\n  author={Oriol Vinyals and Alexander Toshev and Samy Bengio and Dumitru Erhan},\n  journal={2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\n  year={2015},\n  pages={3156-3164}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoskek%2Fcaptioning_chainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoskek%2Fcaptioning_chainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoskek%2Fcaptioning_chainer/lists"}