{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Datasets\n", "\n", "This section describes how to install common datasets used for training new models and for computing evaluation scores for entire datasets. In general, these datasets are large and require a computer with a good GPU to train and evaluate in reasonable times.\n", "\n", "These datasets are not required to do pose predictions on your own images.\n", "\n", "You are unlikely to need all the datasets, so donwload only what you need." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Download COCO data\n", "\n", "[COCO](http://cocodataset.org/) is a great datasets containing many types of annotations, including bounding boxes, 2D poses, etc.\n", "\n", "```sh\n", "mkdir data-mscoco\n", "cd data-mscoco\n", "\n", "wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip\n", "wget http://images.cocodataset.org/annotations/image_info_test2017.zip\n", "unzip annotations_trainval2017.zip\n", "unzip image_info_test2017.zip\n", "\n", "mkdir images\n", "cd images\n", "wget http://images.cocodataset.org/zips/val2017.zip\n", "wget http://images.cocodataset.org/zips/train2017.zip\n", "wget http://images.cocodataset.org/zips/test2017.zip\n", "unzip val2017.zip\n", "unzip train2017.zip\n", "unzip test2017.zip\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## COCO Person Skeletons\n", "\n", "COCO / kinematic tree / dense:\n", "\n", "```{image} ../docs/skeleton_coco.png\n", ":height: \"250\"\n", "```\n", "```{image} ../docs/skeleton_kinematic_tree.png\n", ":height: \"250\"\n", "```\n", "```{image} ../docs/skeleton_dense.png\n", ":height: \"250\"\n", "```\n", "\n", "Created with `python3 -m openpifpaf.datasets.constants`." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(coco-person-keypoints)=\n", "## COCO Person Keypoints" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import openpifpaf\n", "openpifpaf.plugin.register()\n", "\n", "for i, name in enumerate(openpifpaf.plugins.coco.constants.COCO_KEYPOINTS):\n", " print(i, name)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print('associations')\n", "kp_names = openpifpaf.plugins.coco.constants.COCO_KEYPOINTS\n", "for i, (joint1, joint2) in enumerate(openpifpaf.plugins.coco.constants.COCO_PERSON_SKELETON):\n", " print('{:2d}: {:15s} --> {}'.format(i, kp_names[joint1 - 1], kp_names[joint2 - 1]))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Download MPII data\n", "\n", "This MPII data is currently not used anywhere.\n", "\n", "```sh\n", "mkdir data-mpii\n", "cd data-mpii\n", "wget https://datasets.d2.mpi-inf.mpg.de/andriluka14cvpr/mpii_human_pose_v1.tar.gz\n", "wget https://datasets.d2.mpi-inf.mpg.de/andriluka14cvpr/mpii_human_pose_v1_u12_2.zip\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Download NightOwls data\n", "\n", "```sh\n", "mkdir data-nightowls\n", "cd data-nightowls\n", "wget http://www.robots.ox.ac.uk/\\~vgg/data/nightowls/python/nightowls_validation.json\n", "wget http://www.robots.ox.ac.uk/\\~vgg/data/nightowls/python/nightowls_validation.zip\n", "unzip nightowls_validation.zip\n", "```" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5-final" } }, "nbformat": 4, "nbformat_minor": 2 }