Skip to content

Commit

Permalink
v17.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jomjol committed Apr 11, 2024
1 parent 8fa8555 commit e6afddd
Show file tree
Hide file tree
Showing 1,877 changed files with 3,375 additions and 1,318 deletions.
1,315 changes: 729 additions & 586 deletions .ipynb_checkpoints/Train_CNN_Digital-Readout-Small-v2-checkpoint.ipynb

Large diffs are not rendered by default.

82 changes: 82 additions & 0 deletions 01 - Clean Images.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "80f3d28e-8319-4249-8fcd-cd00a1ca3cad",
"metadata": {},
"source": [
"## Remove Duplicates"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "9fe06b5a-33d3-45ce-9caa-51c8d98c84d8",
"metadata": {},
"outputs": [],
"source": [
"from collectmeterdigits.collect import ziffer_data_files, remove_similar_images"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "edc70529-736c-496e-95e4-48b58c30425d",
"metadata": {},
"outputs": [],
"source": [
"target_raw_path = \"./ziffer_sortiert_raw\" # here all raw images are stored"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "3c680b18-231e-4892-8698-9f0cb83e408b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Find similar images now in 1519 images ...\n",
"...1000\n",
"273 duplicates will be removed.\n"
]
}
],
"source": [
"files = ziffer_data_files(target_raw_path)\n",
"remove_similar_images(files, \"abc\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "22b0a110-7f4e-4e1f-a6cc-97078cb18adf",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"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.11.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"1554 files have been deleted.\n"
"1573 files have been deleted.\n"
]
}
],
Expand All @@ -59,14 +59,6 @@
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Muell\\AppData\\Local\\Temp\\ipykernel_17672\\2984607959.py:11: DeprecationWarning: NEAREST is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.NEAREST or Dither.NONE instead.\n",
" test_image = test_image.resize((target_size_x, target_size_y), Image.NEAREST)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
Expand All @@ -76,8 +68,7 @@
"750 ...\n",
"1000 ...\n",
"1250 ...\n",
"1500 ...\n",
"1573\n"
"1300\n"
]
}
],
Expand All @@ -97,7 +88,7 @@
" base = os.path.splitext(base)[0] + \".jpg\"\n",
" save_name = Output_dir + '/' + base\n",
"# print(\"in: \" + aktfile + \" - out: \" + save_name)\n",
" test_image.save(save_name, \"JPEG\")\n",
" test_image.save(save_name, \"JPEG\", quality=100)\n",
"print(count)"
]
},
Expand Down Expand Up @@ -125,7 +116,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.11.8"
}
},
"nbformat": 4,
Expand Down
133 changes: 0 additions & 133 deletions Image_Preparation.ipynb

This file was deleted.

Loading

0 comments on commit e6afddd

Please sign in to comment.