karussel_v2+new_model

This commit is contained in:
2022-06-20 20:50:07 +03:00
parent f6af1d69a1
commit ac04526fe1
470 changed files with 1258 additions and 26 deletions

View File

@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "07bdc0da",
"metadata": {},
"outputs": [],
@@ -11,7 +11,7 @@
"import json\n",
"import numpy as np\n",
"from tqdm.notebook import tqdm\n",
"path_dataset = r'D:\\karusel'\n",
"path_dataset = r'D:\\downloads\\Nurburg-karussel'\n",
"from SuperviselyKeypointsGUI.SuperviselyKeypointsGUI import *\n",
"\n",
"\n",
@@ -21,7 +21,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "ca890aa0",
"metadata": {},
"outputs": [],
@@ -34,7 +34,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"id": "b8135031",
"metadata": {},
"outputs": [],
@@ -60,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "79762c08",
"metadata": {},
"outputs": [],
@@ -79,10 +79,25 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"id": "f9440b54",
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "36c51c895f4e4f6b806c2af9e7bc14b9",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/448 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for obj in tqdm(coco['annotations']):\n",
" keypoints_2d = np.array(obj['keypoints']).reshape((-1, 3))[:, :2]\n",
@@ -96,7 +111,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"id": "dfcb675b",
"metadata": {},
"outputs": [],
@@ -115,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"id": "3aec7a2b",
"metadata": {},
"outputs": [],
@@ -150,17 +165,17 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 23,
"id": "aafd54fb",
"metadata": {},
"outputs": [],
"source": [
"train, test = split_coco_json(coco, 0.1, random_state=777)"
"train, test = split_coco_json(coco, 0.1, random_state=77)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 24,
"id": "f6af98fc",
"metadata": {},
"outputs": [],
@@ -169,7 +184,7 @@
"train_path_images = [os.path.join(path_dataset, 'images', 'img', x['file_name']) for x in train['images']]\n",
"\n",
"import shutil\n",
"path_new_dataset = r'C:\\Users\\Kir\\Jupiter\\Nurburg\\OpenPifPaf\\Training\\Karusel_dataset'\n",
"path_new_dataset = r'C:\\Users\\Kir\\Jupiter\\Drivecast\\place6D_Nurburgring\\Karussell\\Training\\Karusel_dataset_v2'\n",
"\n",
"path_train_img = os.path.join(path_new_dataset, 'images', 'train')\n",
"path_test_img = os.path.join(path_new_dataset, 'images', 'val')\n",