View source
Download
.ipynb
Create Table from COCO Keypoints¶
Create a 3LC keypoints table from COCO-format annotations for human pose estimation and keypoint detection tasks.

COCO keypoints format is the standard for human pose estimation, providing 17 anatomical keypoints with visibility annotations. It’s widely used in research and provides rich pose information for training robust pose estimation models.
This notebook demonstrates loading COCO keypoints annotations and converting them to a 3LC Table. We process both the annotation JSON file and corresponding images, creating proper keypoint structures with coordinate positions and visibility flags.
Project setup¶
[ ]:
PROJECT_NAME = "3LC Tutorials - COCO128"
DATASET_NAME = "COCO128"
TABLE_NAME = "initial-keypoints"
DATA_PATH = "../../../data"
Install dependencies¶
[ ]:
%pip install 3lc
Imports¶
Create table¶
[ ]:
[ ]:
table = tlc.Table.from_coco(
annotations_file=annotations_file,
image_folder=image_folder,
table_name=TABLE_NAME,
project_name=PROJECT_NAME,
dataset_name=DATASET_NAME,
task="pose",
if_exists="rename",
# The remaining parameters are optional, and are used for decoration in the 3LC Dashboard
lines=tlc.KeypointHelper.COCO_SKELETON,
points=tlc.KeypointHelper.COCO_KEYPOINT_DEFAULT_POSE,
point_attributes=tlc.KeypointHelper.COCO_KEYPOINT_NAMES,
flip_indices=tlc.KeypointHelper.COCO_FLIP_INDICES,
)
[ ]:
table