COCO API のインストール(Ubuntu 上)

COCO API の Web ページ:

COCO is a large image dataset designed for object detection, segmentation, person keypoints detection, stuff segmentation, and caption generation. This package provides Matlab, Python, and Lua APIs that assists in loading, parsing, and visualizing the annotations in COCO. Please visit https://cocodataset.org/ for more information on COCO, including for the data, paper, and tutorials. The exact format of the annotations is also described on the COCO website. The Matlab and Python APIs are complete, the Lua API provides only basic functionality. In addition to this API, please download both the COCO images and annotations in order to run the demos and use the API. Both are available on the project website. -Please download, unzip, and place the images in: coco/images/ -Please download and place the annotations in: coco/annotations/ For substantially more details on the API please see https://cocodataset.org/#download. After downloading the images and annotations, run the Matlab, Python, or Lua demos for example usage.

前準備

Ubuntu のシステム更新

Ubuntu で OS のシステム更新を行うときは, 端末で,次のコマンドを実行する.

Ubuntu のインストールは別ページ »で説明

sudo apt -y update
sudo apt -yV upgrade
sudo /sbin/shutdown -r now

Python3 開発用ファイル,pip, setuptools, venv のインストール(Ubuntu 上)

Python のインストールは行わない(Ubuntu のシステム Python を用いる.)

Python, pip のコマンドでの起動のまとめ.

Ubuntu のシステム Python を用いるとき, python, pip は,次のコマンドで起動できる.

Ubuntu での Python 開発環境(JupyterLab, spyder, nteract)のインストール: 別ページ »で説明

Python3 開発用ファイル,pip, setuptools, venv のインストール

端末で,次のコマンドを実行する.

sudo apt -y update
sudo apt -y install python-is-python3 python3-dev python-dev-is-python3 python3-pip python3-setuptools python3-venv build-essential

NVIDIA ドライバ,NVIDIA CUDA ツールキット 11.7, NVIDIA cuDNN v8.4.1 のインストールのインストール(Ubuntu 上)

Ubuntu での NVIDIA ドライバ,NVIDIA CUDA ツールキット 11.7, NVIDIA cuDNN v8.4.1 のインストール: 別ページ »で説明

cocoapi のインストール

関連する外部ページhttps://github.com/cocodataset/cocoapi

sudo pip install numpy pyyaml matplotlib opencv-python setuptools Cython
sudo mkdir /usr/local/cocoapi
sudo git clone https://github.com/cocodataset/cocoapi.git /usr/local/cocoapi
cd /usr/local/cocoapi/PythonAPI
python3 setup.py build
sudo python3 setup.py install