Github連接:https://github.com/tylin/coco-captionjava
Ubuntu版本信息python
tylin/coco-caption環境配置linux
安裝完畢後,重啓終端,建立一個新的Python環境(python=2.7)。git
進入新環境 coco-caption,使用pip安裝依賴包matplotlib,scikit-image等。github
conda activate coco-caption conda list pip install matplotlib pip install scikit-image conda list
cd Downloads/ ls tar -xzvf jdk-8u211-linux-x64.tar.gz
搭建 jdk1.8 運行環境。json
使剛剛設置的環境變量當即生效,並測試環境變量配置是否正確。ubuntu
source /etc/profile
java -version
unzip coco-caption-master.zip
進入「~/Downloads/coco-caption-master/」目錄,運行 get_stanford_models.sh 文件。測試
cd coco-caption-master/ ./get_stanford_models.sh
在 coco-caption 環境中,使用pip安裝jupyter notebook。ui
conda activate coco-caption pip install jupyter notebook
在 coco-caption 環境中,輸入jupyter notebook,選擇cocoEvalCapDemo.ipynb。spa
點擊「Kernel -> Restart & Run All」,Cell [1] ~ [5]可以正常運行。若是須要Cell [6]顯示圖片,須要下載MSCOCO 2014 val2014圖片,放在對應的目錄下。
/coco-caption-master/results目錄下文件的解釋