# Uploading Annotations from UI

Nucleus currently supports directly uploading bounding box annotations [from UI](https://dashboard.scale.com/nucleus/onboarding) in the following text file formats (TXT, JSON). For other annotation formats, please use the Nucleus API.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/16e49b3-Nucleus_UI_Annotation_Upload_5.04.46_PM.png",
        "Nucleus UI Annotation Upload 5.04.46 PM.png",
        3318,
        1772,
        "#edeeec"
      ]
    }
  ]
}
[/block]

## `COCO Object Detection`

Sample annotation file structure from the [COCO 2017 Validation Dataset](https://cocodataset.org/#download).

[block:code]
{
  "codes": [
    {
      "code": "{\n    \"info\": {\n        \"description\": \"COCO 2017 Dataset\",\n        \"url\": \"http://cocodataset.org\",\n        \"version\": \"1.0\",\n        \"year\": 2017,\n        \"contributor\": \"COCO Consortium\",\n        \"date_created\": \"2017/09/01\"\n    },\n    \"licenses\": [\n        {\n            \"url\": \"http://creativecommons.org/licenses/by-nc-sa/2.0/\",\n            \"id\": 1,\n            \"name\": \"Attribution-NonCommercial-ShareAlike License\"\n        },\n        ...   \n    ],\n    \"images\": [\n        {\n        \t\"id\": 397133\n            \"license\": 4,\n            \"file_name\": \"000000397133.jpg\",\n            \"height\": 427,\n            \"width\": 640,\n            \"date_captured\": \"2013-11-14 17:02:52\",\n        },\n        ...\n    ],\n    \"annotations\": [\n        {\n            \"id\": 82445,\n            \"image_id\": 397133,\n            \"category_id\": 44,\n            \"bbox\": [217.62, 240.54, 38.99, 57.75],\n            \"segmentation\": [...],\n            \"area\": 1481.38,\n            \"iscrowd\": 0\n        },\n        ...\n    ],\n    \"categories\": [\n        {\t\n            \"id\": 44,\n            \"name\": \"bottle\"\n            \"supercategory\": \"kitchen\",\n        },\n        ...\n    ]\n}",
      "language": "text",
      "name": "annotations.json"
    }
  ]
}
[/block]

## `PASCAL Annotation Version 1.00`

Sample annotation file from the [Penn-Fudan Pedestrian Database](https://www.cis.upenn.edu/~jshi/ped_html/).

[block:code]
{
  "codes": [
    {
      "code": "# Compatible with PASCAL Annotation Version 1.00\nImage filename : \"PennFudanPed/PNGImages/FudanPed00001.png\"\nImage size (X x Y x C) : 559 x 536 x 3\nDatabase : \"The Penn-Fudan-Pedestrian Database\"\nObjects with ground truth : 2 { \"PASpersonWalking\" \"PASpersonWalking\" }\n# Note there may be some objects not included in the ground truth list for they are severe-occluded\n# or have very small size.\n# Top left pixel co-ordinates : (1, 1)\n# Details for pedestrian 1 (\"PASpersonWalking\")\nOriginal label for object 1 \"PASpersonWalking\" : \"PennFudanPed\"\nBounding box for object 1 \"PASpersonWalking\" (Xmin, Ymin) - (Xmax, Ymax) : (160, 182) - (302, 431)\nPixel mask for object 1 \"PASpersonWalking\" : \"PennFudanPed/PedMasks/FudanPed00001_mask.png\"\n\n# Details for pedestrian 2 (\"PASpersonWalking\")\nOriginal label for object 2 \"PASpersonWalking\" : \"PennFudanPed\"\nBounding box for object 2 \"PASpersonWalking\" (Xmin, Ymin) - (Xmax, Ymax) : (420, 171) - (535, 486)\nPixel mask for object 2 \"PASpersonWalking\" : \"PennFudanPed/PedMasks/FudanPed00001_mask.png\"",
      "language": "text",
      "name": "FudanPed00001.txt"
    }
  ]
}
[/block]

Corresponding sample image, before and after annotations are applied from the file above.

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/acf61ca-FudanPed00001.png",
        "FudanPed00001.png",
        3004,
        1440,
        "#8e897b"
      ]
    }
  ]
}
[/block]