{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "7194c100",
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import matplotlib as plt\n",
    "from PIL import Image\n",
    "import natsort\n",
    "import json\n",
    "from collections import Counter\n",
    "import random\n",
    "from sklearn.model_selection import train_test_split\n",
    "import copy\n",
    "from separate import separate_train_test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "69f6eb7d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "399\n"
     ]
    }
   ],
   "source": [
    "\n",
    "# load json file\n",
    "proj = 'hdvehicle' \n",
    "path = \"/data/si/darwin/si/construction-equipment/releases/\"+proj+ '/annotations/'\n",
    "save_path = \"/data/si/darwin/\"+proj+'/annotations/'\n",
    "train_name = \"train.json\"\n",
    "# val_name = \"val.json\"\n",
    "# test_name = \"test.json\"\n",
    "if not os.path.exists(save_path): \n",
    "    os.makedirs(save_path)\n",
    "\n",
    "file_list = natsort.natsorted(os.listdir(path))\n",
    "file_list = [f for f in file_list if not f.startswith('.ipynb')]\n",
    "\n",
    "print(len(file_list))\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "40996ca5",
   "metadata": {
    "tags": []
   },
   "source": [
    "## Delete some class (delete under 500 imgs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "a090ab0a",
   "metadata": {},
   "outputs": [],
   "source": [
    "# ban_class=[\"11\",\"12\",\"17\"]\n",
    "# ban_file_names = []\n",
    "\n",
    "# for idx,file_name in enumerate(file_list):\n",
    "#     with open(path+file_name, 'r') as f:\n",
    "#         json_data = json.load(f)\n",
    "    \n",
    "#     # categories\n",
    "#     for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "#         if instance[\"class\"] in ban_class:\n",
    "#             if file_name not in ban_file_names:\n",
    "#                 ban_file_names.append(file_name)\n",
    "\n",
    "\n",
    "# for name in ban_file_names:\n",
    "#     file_list.remove(name)\n",
    "    \n",
    "# print(len(file_list))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "442da2d6",
   "metadata": {},
   "source": [
    "## Separate train/val/test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8964da0a",
   "metadata": {},
   "outputs": [],
   "source": [
    "# train, test=separate_train_test(file_list, 0.2)\n",
    "\n",
    "# train, val=separate_train_test(train, 0.05)\n",
    "\n",
    "\n",
    "# print(len(train))\n",
    "# print(len(val))\n",
    "# print(len(test))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "57670d5d",
   "metadata": {},
   "source": [
    "## Category list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "e4d89aa0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['09', '10', '11', '12', '13', '16', '17', '18']\n"
     ]
    }
   ],
   "source": [
    "## make category\n",
    "category_list=[]\n",
    "\n",
    "for idx,file_name in enumerate(file_list):\n",
    "    with open(os.path.join(path,file_name), 'r') as f:\n",
    "        json_data = json.load(f)\n",
    "    \n",
    "    # categories\n",
    "    for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "        if instance[\"name\"] in category_list:\n",
    "            pass\n",
    "        else:\n",
    "            category_list.append(instance[\"name\"])\n",
    "\n",
    "category_list=natsort.natsorted(category_list)\n",
    "\n",
    "print(category_list)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "b6f06849",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'09': 20740,\n",
       " '10': 2304,\n",
       " '11': 2242,\n",
       " '12': 10949,\n",
       " '13': 3384,\n",
       " '16': 2613,\n",
       " '17': 2922,\n",
       " '18': 6224}"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "category_dic_total_count = dict.fromkeys(category_list, 0)\n",
    "\n",
    "for idx,file_name in enumerate(file_list):\n",
    "    with open(path+file_name, 'r') as f:\n",
    "        json_data = json.load(f)\n",
    "    \n",
    "    # categories\n",
    "    for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "        for frame in instance[\"frames\"]:\n",
    "            category_dic_total_count[instance[\"name\"]]+=1\n",
    "        \n",
    "category_dic_total_count"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7fa9ed51",
   "metadata": {},
   "source": [
    "## Count train/val/test dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "cbe2bcf2",
   "metadata": {},
   "outputs": [],
   "source": [
    "# train_dic_count = dict.fromkeys(category_list, 0)\n",
    "# val_dic_count = dict.fromkeys(category_list, 0)\n",
    "# test_dic_count = dict.fromkeys(category_list, 0)\n",
    "\n",
    "# for idx,file_name in enumerate(train):\n",
    "#     with open(path+file_name, 'r') as f:\n",
    "#         json_data = json.load(f)\n",
    "    \n",
    "#     # categories\n",
    "#     for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "#         train_dic_count[instance[\"class\"]]+=1\n",
    "        \n",
    "# for idx,file_name in enumerate(val):\n",
    "#     with open(path+file_name, 'r') as f:\n",
    "#         json_data = json.load(f)\n",
    "    \n",
    "#     # categories\n",
    "#     for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "#         val_dic_count[instance[\"class\"]]+=1\n",
    "        \n",
    "# for idx,file_name in enumerate(test):\n",
    "#     with open(path+file_name, 'r') as f:\n",
    "#         json_data = json.load(f)\n",
    "    \n",
    "#     # categories\n",
    "#     for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "#         test_dic_count[instance[\"class\"]]+=1\n",
    "        \n",
    "# print(train_dic_count)\n",
    "# print(val_dic_count)\n",
    "# print(test_dic_count)\n",
    "# print(category_dic_total_count)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bbb6ecbf",
   "metadata": {
    "tags": []
   },
   "source": [
    "## distriution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "bfc6b855",
   "metadata": {},
   "outputs": [],
   "source": [
    "# import matplotlib as mpl\n",
    "\n",
    "# print(mpl.matplotlib_fname())\n",
    "# print(mpl.get_cachedir())\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "4c932f29",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "# from matplotlib import font_manager, rc\n",
    "\n",
    "# font_path = '/root/anaconda3/envs/yt37/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf/NanumGothic.ttf'\n",
    "# font = font_manager.FontProperties(fname=font_path).get_name()\n",
    "# rc('font', family=font)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "58fc79b1",
   "metadata": {},
   "outputs": [],
   "source": [
    "# import matplotlib.pyplot as plt\n",
    "# fig = plt.figure()\n",
    "# ax = fig.add_axes([0,0,1,1])\n",
    "\n",
    "# label_name = [\"포크레인\", \"페이로다\",\"지게차\",\"덤프트럭\",\"레미콘\",\"항타기\",\"트럭\",\"고소작업대\",\"타워크레인\"]\n",
    "\n",
    "\n",
    "# ax.bar(label_name, train_dic_count.values(), label=\"Train\")\n",
    "# ax.bar(label_name, val_dic_count.values(), label=\"Val\")\n",
    "# ax.bar(label_name, test_dic_count.values(), label=\"Test\")\n",
    "# plt.legend()\n",
    "# plt.savefig('savefig_default.jpg')\n",
    "# plt.show()\n",
    "\n",
    "# plt.savefig('savefig_default.jpg')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e72247cb",
   "metadata": {
    "tags": []
   },
   "source": [
    "# Coco format"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "73f5097e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# categoires part of coco\n",
    "category_dic_list=[]\n",
    "\n",
    "for idx, label in enumerate(category_list):\n",
    "    category_dic={}\n",
    "    category_dic[\"id\"]=idx+1\n",
    "    category_dic[\"name\"]=label\n",
    "    category_dic[\"supercategory\"]='root'\n",
    "    category_dic_list.append(category_dic)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "056fa118",
   "metadata": {},
   "outputs": [],
   "source": [
    "coco_format={}\n",
    "coco_format['images']=[]\n",
    "coco_format['annotations']=[]\n",
    "\n",
    "category=[]\n",
    "\n",
    "total_n=0\n",
    "total_img_id=0\n",
    "for idx,file_name in enumerate(file_list):\n",
    "    with open(path+file_name, 'r') as f:\n",
    "        json_data = json.load(f)\n",
    "    \n",
    "    total_frame_n = int(json_data[\"image\"][\"frame_count\"])\n",
    "    for j in range(total_frame_n):\n",
    "        \n",
    "        total_img_id+=1\n",
    "        \n",
    "        image_dic={}\n",
    "        image_dic['id']=total_img_id\n",
    "        image_dic['width']=json_data[\"image\"][\"width\"]\n",
    "        image_dic['height']=json_data[\"image\"][\"height\"]\n",
    "        image_dic['file_name']=file_name.split('.')[0]+'/'+str(j).zfill(7)+'.png'\n",
    "        coco_format['images'].append(image_dic)\n",
    "\n",
    "        for idy,instance in enumerate(json_data[\"annotations\"]):            \n",
    "            if str(j) in instance[\"frames\"].keys():\n",
    "                total_n+=1\n",
    "                # if \"box\" in instance.keys(): # only bbox\n",
    "                annoation_dic={} \n",
    "                annoation_dic['id']=total_n\n",
    "                annoation_dic['image_id']=total_img_id\n",
    "                annoation_dic['category_id']=category_list.index(instance[\"name\"])+1\n",
    "\n",
    "                # x,y,w,h\n",
    "                temp=[]\n",
    "                temp.append(instance[\"frames\"][str(j)][\"bounding_box\"][\"x\"])\n",
    "                temp.append(instance[\"frames\"][str(j)][\"bounding_box\"][\"y\"])\n",
    "                temp.append(instance[\"frames\"][str(j)][\"bounding_box\"][\"w\"])\n",
    "                temp.append(instance[\"frames\"][str(j)][\"bounding_box\"][\"h\"])\n",
    "                annoation_dic['bbox']=temp\n",
    "                \n",
    "                annoation_dic['segmentation']=[[temp[0], temp[1], temp[0]+temp[2], temp[1],\n",
    "                                               temp[0]+temp[2], temp[1]+temp[3], temp[0], temp[1]+temp[3]]]\n",
    "\n",
    "                annoation_dic['area']=temp[2]*temp[3]\n",
    "                annoation_dic['iscrowd']=0\n",
    "                coco_format['annotations'].append(annoation_dic)\n",
    "    \n",
    "# categories\n",
    "coco_format['categories']=category_dic_list\n",
    "\n",
    "#save json\n",
    "with open(save_path+train_name, 'w', encoding='utf-8') as make_file:\n",
    "\n",
    "    json.dump(coco_format, make_file, indent=\"\\t\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "08a9c9b7",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c3bb4a73",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a8c4b69b",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "68377b57",
   "metadata": {},
   "source": [
    "## Coco format for train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "07594ef1",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'train' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[10], line 8\u001b[0m\n\u001b[1;32m      5\u001b[0m category\u001b[38;5;241m=\u001b[39m[]\n\u001b[1;32m      7\u001b[0m total_n\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m0\u001b[39m\n\u001b[0;32m----> 8\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m idx,file_name \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28menumerate\u001b[39m(\u001b[43mtrain\u001b[49m):\n\u001b[1;32m      9\u001b[0m     total_n\u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m\n\u001b[1;32m     10\u001b[0m     \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mopen\u001b[39m(path\u001b[38;5;241m+\u001b[39mfile_name, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;28;01mas\u001b[39;00m f:\n",
      "\u001b[0;31mNameError\u001b[0m: name 'train' is not defined"
     ]
    }
   ],
   "source": [
    "# coco_format={}\n",
    "# coco_format['images']=[]\n",
    "# coco_format['annotations']=[]\n",
    "\n",
    "# category=[]\n",
    "\n",
    "# total_n=0\n",
    "# for idx,file_name in enumerate(train):\n",
    "#     total_n+=1\n",
    "#     with open(path+file_name, 'r') as f:\n",
    "#         json_data = json.load(f)\n",
    "\n",
    "#     image_dic={}\n",
    "#     image_dic['id']=idx\n",
    "#     image_dic['width']=json_data[\"image\"][\"resolution\"][0]\n",
    "#     image_dic['height']=json_data[\"image\"][\"resolution\"][1]\n",
    "#     image_dic['file_name']=json_data[\"image\"][\"filename\"]\n",
    "#     coco_format['images'].append(image_dic)\n",
    "\n",
    "\n",
    "#     for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "#         total_n+=1\n",
    "#         if \"box\" in instance.keys(): # only bbox\n",
    "#             annoation_dic={} \n",
    "#             annoation_dic['id']=total_n\n",
    "#             annoation_dic['image_id']=idx\n",
    "#             annoation_dic['category_id']=category_list.index(instance[\"class\"])+1\n",
    "#             annoation_dic['segmentation']=[[]]\n",
    "            \n",
    "#             # x,y,w,h\n",
    "#             temp=[]\n",
    "#             temp.append(instance[\"box\"][0])\n",
    "#             temp.append(instance[\"box\"][1])\n",
    "#             temp.append(instance[\"box\"][2]-instance[\"box\"][0])\n",
    "#             temp.append(instance[\"box\"][3]-instance[\"box\"][1])\n",
    "#             annoation_dic['bbox']=temp\n",
    "            \n",
    "#             annoation_dic['area']=temp[2]*temp[3]\n",
    "#             annoation_dic['iscrowd']=0\n",
    "#             coco_format['annotations'].append(annoation_dic)\n",
    "    \n",
    "# # categories\n",
    "# coco_format['categories']=category_dic_list\n",
    "\n",
    "# #save json\n",
    "# with open(save_path+train_name, 'w', encoding='utf-8') as make_file:\n",
    "\n",
    "#     json.dump(coco_format, make_file, indent=\"\\t\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9b822852",
   "metadata": {},
   "source": [
    "## Coco format for val"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "732c289c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# coco_format={}\n",
    "# coco_format['images']=[]\n",
    "# coco_format['annotations']=[]\n",
    "\n",
    "# category=[]\n",
    "\n",
    "# total_n=0\n",
    "# for idx,file_name in enumerate(val):\n",
    "#     total_n+=1\n",
    "#     with open(path+file_name, 'r') as f:\n",
    "#         json_data = json.load(f)\n",
    "\n",
    "#     image_dic={}\n",
    "#     image_dic['id']=idx\n",
    "#     image_dic['width']=json_data[\"image\"][\"resolution\"][0]\n",
    "#     image_dic['height']=json_data[\"image\"][\"resolution\"][1]\n",
    "#     image_dic['file_name']=json_data[\"image\"][\"filename\"]\n",
    "#     coco_format['images'].append(image_dic)\n",
    "\n",
    "\n",
    "#     for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "#         total_n+=1\n",
    "#         if \"box\" in instance.keys(): # only bbox\n",
    "#             annoation_dic={} \n",
    "#             annoation_dic['id']=total_n\n",
    "#             annoation_dic['image_id']=idx\n",
    "#             annoation_dic['category_id']=category_list.index(instance[\"class\"])+1\n",
    "#             annoation_dic['segmentation']=[[]]\n",
    "            \n",
    "#             # x,y,w,h\n",
    "#             temp=[]\n",
    "#             temp.append(instance[\"box\"][0])\n",
    "#             temp.append(instance[\"box\"][1])\n",
    "#             temp.append(instance[\"box\"][2]-instance[\"box\"][0])\n",
    "#             temp.append(instance[\"box\"][3]-instance[\"box\"][1])\n",
    "#             annoation_dic['bbox']=temp\n",
    "            \n",
    "#             annoation_dic['area']=temp[2]*temp[3]\n",
    "#             annoation_dic['iscrowd']=0\n",
    "#             coco_format['annotations'].append(annoation_dic)\n",
    "    \n",
    "# # categories\n",
    "# coco_format['categories']=category_dic_list\n",
    "\n",
    "# #save json\n",
    "# with open(save_path+val_name, 'w', encoding='utf-8') as make_file:\n",
    "\n",
    "#     json.dump(coco_format, make_file, indent=\"\\t\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0bde0d46",
   "metadata": {},
   "source": [
    "## Coco format for test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a7bf0c71",
   "metadata": {},
   "outputs": [],
   "source": [
    "# coco_format={}\n",
    "# coco_format['images']=[]\n",
    "# coco_format['annotations']=[]\n",
    "\n",
    "# category=[]\n",
    "\n",
    "# total_n=0\n",
    "# for idx,file_name in enumerate(test):\n",
    "#     total_n+=1\n",
    "#     with open(path+file_name, 'r') as f:\n",
    "#         json_data = json.load(f)\n",
    "\n",
    "#     image_dic={}\n",
    "#     image_dic['id']=idx\n",
    "#     image_dic['width']=json_data[\"image\"][\"resolution\"][0]\n",
    "#     image_dic['height']=json_data[\"image\"][\"resolution\"][1]\n",
    "#     image_dic['file_name']=json_data[\"image\"][\"filename\"]\n",
    "#     coco_format['images'].append(image_dic)\n",
    "\n",
    "\n",
    "#     for idy,instance in enumerate(json_data[\"annotations\"]):\n",
    "#         total_n+=1\n",
    "#         if \"box\" in instance.keys(): # only bbox\n",
    "#             annoation_dic={} \n",
    "#             annoation_dic['id']=total_n\n",
    "#             annoation_dic['image_id']=idx\n",
    "#             annoation_dic['category_id']=category_list.index(instance[\"class\"])+1\n",
    "#             annoation_dic['segmentation']=[[]]\n",
    "            \n",
    "#             # x,y,w,h\n",
    "#             temp=[]\n",
    "#             temp.append(instance[\"box\"][0])\n",
    "#             temp.append(instance[\"box\"][1])\n",
    "#             temp.append(instance[\"box\"][2]-instance[\"box\"][0])\n",
    "#             temp.append(instance[\"box\"][3]-instance[\"box\"][1])\n",
    "#             annoation_dic['bbox']=temp\n",
    "            \n",
    "#             annoation_dic['area']=temp[2]*temp[3]\n",
    "#             annoation_dic['iscrowd']=0\n",
    "#             coco_format['annotations'].append(annoation_dic)\n",
    "    \n",
    "# # categories\n",
    "# coco_format['categories']=category_dic_list\n",
    "\n",
    "# #save json\n",
    "# with open(save_path+test_name, 'w', encoding='utf-8') as make_file:\n",
    "\n",
    "#     json.dump(coco_format, make_file, indent=\"\\t\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b0d2c24c",
   "metadata": {},
   "source": [
    "## Copy image"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "520ac66c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# import shutil\n",
    "\n",
    "# img_src_path='/root/DataSet/aihub_construction/vehicle/images/'\n",
    "# img_dest_path_train='/root/DataSet/aihub_construction/vehicle/train/'\n",
    "# img_dest_path_val='/root/DataSet/aihub_construction/vehicle/val/'\n",
    "# img_dest_path_test='/root/DataSet/aihub_construction/vehicle/test/'\n",
    "\n",
    "# # for train\n",
    "# for name in train:\n",
    "#     source = img_src_path+name.split('.')[0]+'.jpg'\n",
    "#     destination = img_dest_path_train+name.split('.')[0]+'.jpg'\n",
    "#     shutil.copyfile(source, destination)\n",
    "    \n",
    "# # for val\n",
    "# for name in val:\n",
    "#     source = img_src_path+name.split('.')[0]+'.jpg'\n",
    "#     destination = img_dest_path_val+name.split('.')[0]+'.jpg'\n",
    "#     shutil.copyfile(source, destination)\n",
    "    \n",
    "# # for test\n",
    "# for name in test:\n",
    "#     source = img_src_path+name.split('.')[0]+'.jpg'\n",
    "#     destination = img_dest_path_test+name.split('.')[0]+'.jpg'\n",
    "#     shutil.copyfile(source, destination)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f2fb5523",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "yt38",
   "language": "python",
   "name": "yt38"
  },
  "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.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
