Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,7 @@ dmypy.json

# Pyre type checker
.pyre/

dataset/
train/
val/
35 changes: 29 additions & 6 deletions ImageProcess.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -42,7 +42,7 @@
" shutil.move(from_file_path, to_file_path)\n",
"\n",
"\n",
"def resize_image(img_path, IMAGE_WIDTH=1980, IMAGE_HEIGHT=1080):\n",
"def resize_image(img_path, IMAGE_WIDTH=1024, IMAGE_HEIGHT=1024):\n",
" for image in img_path:\n",
" img = Image.open(image)\n",
"\n",
Expand Down Expand Up @@ -98,17 +98,35 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"path = './train/images/'\n",
"files = os.listdir(path)\n",
"img_path = [path + file for file in files]\n",
"\n",
"# 使うときにコメントを外してください\n",
"resize_image(img_path)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Increase Image"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"for img in img_path:\n",
" increase_image(img, degree=120, step=120)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -118,7 +136,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -167,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -176,6 +194,11 @@
" shutil.move(os.path.join(mask_img_path, mask_imgs[i]), os.path.join(train_mask_path, mask_imgs[i]))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
15,225 changes: 7,377 additions & 7,848 deletions train_model.ipynb

Large diffs are not rendered by default.

Binary file added unet_resnet34.pth
Binary file not shown.