142 lines
3.0 KiB
Plaintext
Executable File
142 lines
3.0 KiB
Plaintext
Executable File
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"id": "50d8ca6f-b598-42c1-899c-b1ba79626ea3",
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2024-06-13T11:33:00.568946Z",
|
|
"start_time": "2024-06-13T11:33:00.563026Z"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"import os\n",
|
|
"import cv2\n",
|
|
"import json\n",
|
|
"import glob\n",
|
|
"import seaborn as sns\n",
|
|
"import numpy as np\n",
|
|
"import matplotlib.pyplot as plt\n",
|
|
"\n",
|
|
"from PIL import Image\n",
|
|
"from skimage.measure import label\n",
|
|
"from skimage.measure import regionprops\n",
|
|
"from utils.labelme import save_pred_to_json"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"outputs": [],
|
|
"source": [],
|
|
"metadata": {
|
|
"collapsed": false,
|
|
"ExecuteTime": {
|
|
"end_time": "2024-06-13T11:33:00.582101Z",
|
|
"start_time": "2024-06-13T11:33:00.579686Z"
|
|
}
|
|
},
|
|
"id": "e45d6a8fd546df66",
|
|
"execution_count": 4
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"id": "ae3b40f8-562b-4e5f-b932-6509312dfbf4",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Results 2 Json"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"id": "c17ce107-cac1-4b58-96f2-a183adb730d6",
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2024-06-13T11:33:00.587747Z",
|
|
"start_time": "2024-06-13T11:33:00.584860Z"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"json_path = './logs/0/version_1/test_2048.json'\n",
|
|
"save_path = '/home/gao/mouclear/cc/data/new_v3/gnn_data/e2e/raw/'\n",
|
|
"\n",
|
|
"os.makedirs(save_path, exist_ok=True)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"id": "a1328c78-b657-488c-a444-fa737732e6b3",
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2024-06-13T11:35:18.272198Z",
|
|
"start_time": "2024-06-13T11:33:00.596078Z"
|
|
}
|
|
},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"4694 3\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"save_pred_to_json(json_path, save_path)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"outputs": [],
|
|
"source": [],
|
|
"metadata": {
|
|
"collapsed": false,
|
|
"ExecuteTime": {
|
|
"end_time": "2024-06-13T11:35:18.274778Z",
|
|
"start_time": "2024-06-13T11:35:18.273270Z"
|
|
}
|
|
},
|
|
"id": "b397dc686cd9faed",
|
|
"execution_count": 6
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"id": "b026e354-a04f-4f93-99c7-6159e94391c3",
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2024-06-13T11:35:18.276806Z",
|
|
"start_time": "2024-06-13T11:35:18.275372Z"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"name": "python3",
|
|
"language": "python",
|
|
"display_name": "Python 3 (ipykernel)"
|
|
},
|
|
"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.16"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|