Skip to content

Commit 8a8fc47

Browse files
committed
reformat mafat nb
1 parent 3e444e9 commit 8a8fc47

File tree

1 file changed

+35
-50
lines changed

1 file changed

+35
-50
lines changed

examples/mafat-final.ipynb

Lines changed: 35 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"\n",
2020
"In this notebook we load satellite data from Mafat Competition https://mafatchallenge.mod.gov.il/, which consists of 16 bit grayscale images with rotated bounding boxes.\n",
2121
"\n",
22+
"The dataset is also available on Kaggle [here](https://www.kaggle.com/datasets/dragonzhang/mafat-train-dataset).\n",
23+
"\n",
2224
"We show how to work with this dataset using fastdup. It takes 140 seconds to process 18,000 bounding boxes and find all similarities.\n",
2325
"\n",
2426
"We use components gallery to highly suspected wrong bounding boxes as well as correct bounding boxes.\n"
@@ -165,36 +167,26 @@
165167
}
166168
],
167169
"source": [
168-
"# install latst fastdup (required 0.904 or up)\n",
169-
"%pip install fastdup -U --force-reinstall"
170+
"!pip install fastdup -Uq"
170171
]
171172
},
172173
{
173-
"cell_type": "code",
174-
"execution_count": 1,
175-
"id": "62c0ac2e-cd8d-428e-b5ff-1b75c917f9e3",
174+
"cell_type": "markdown",
175+
"id": "547f2a35",
176176
"metadata": {},
177-
"outputs": [],
178177
"source": [
179-
"#download mafat traing data, extract the zip file and put the notebook one level below images/ folder"
178+
"Download mafat traing data, extract the zip file and put the notebook one level below images/ folder"
180179
]
181180
},
182181
{
183182
"cell_type": "markdown",
184183
"id": "538d2699-4678-4f0b-a570-412d4a97c7ae",
185184
"metadata": {},
186185
"source": [
187-
"# Prepare annotation for fastdup format"
188-
]
189-
},
190-
{
191-
"cell_type": "code",
192-
"execution_count": 18,
193-
"id": "f2fa9853-0765-4d0a-a474-1eb703ea0a66",
194-
"metadata": {},
195-
"outputs": [],
196-
"source": [
197-
"# Here we read the data as given in the competition, one annotation file per each image. We combine all files into a single flat table"
186+
"## Prepare annotation for fastdup format\n",
187+
"\n",
188+
"\n",
189+
"Here we read the data as given in the competition, one annotation file per each image. We combine all files into a single flat table"
198190
]
199191
},
200192
{
@@ -448,7 +440,7 @@
448440
"id": "620799ea-3318-4a74-8dd0-d74ec3f42849",
449441
"metadata": {},
450442
"source": [
451-
"# Run fastdup to crop and build a model for the crops"
443+
"## Run fastdup to crop and build a model for the crops"
452444
]
453445
},
454446
{
@@ -531,7 +523,7 @@
531523
"id": "a834aaaa-a76c-49bc-b293-c3c3e114d7aa",
532524
"metadata": {},
533525
"source": [
534-
"# Find suspected wrong bounding boxes\n",
526+
"## Find suspected wrong bounding boxes\n",
535527
"\n",
536528
"From - crop image name\n",
537529
"To - similar images\n",
@@ -1980,13 +1972,11 @@
19801972
]
19811973
},
19821974
{
1983-
"cell_type": "code",
1984-
"execution_count": 9,
1985-
"id": "44174ffd-72f0-4a63-8849-6989bf982fa2",
1975+
"cell_type": "markdown",
1976+
"id": "ffa5de31",
19861977
"metadata": {},
1987-
"outputs": [],
19881978
"source": [
1989-
"# Looking at the raw cluster to link back cluster name to to file"
1979+
"Looking at the raw cluster to link back cluster name to to file"
19901980
]
19911981
},
19921982
{
@@ -2124,13 +2114,11 @@
21242114
]
21252115
},
21262116
{
2127-
"cell_type": "code",
2128-
"execution_count": 15,
2129-
"id": "bcb6a063-698c-480b-88e4-8ec3c9bfdb27",
2117+
"cell_type": "markdown",
2118+
"id": "bcc93d2e",
21302119
"metadata": {},
2131-
"outputs": [],
21322120
"source": [
2133-
"# Looking at good labels"
2121+
"Looking at good labels"
21342122
]
21352123
},
21362124
{
@@ -3491,13 +3479,13 @@
34913479
]
34923480
},
34933481
{
3494-
"cell_type": "code",
3495-
"execution_count": null,
3496-
"id": "5b86b38f-2f3e-4ab5-911b-f43079f82e93",
3482+
"cell_type": "markdown",
3483+
"id": "b4d06ad8",
34973484
"metadata": {},
3498-
"outputs": [],
34993485
"source": [
3500-
"# Let's look on outliers on the satellite image level"
3486+
"## Outliers\n",
3487+
"\n",
3488+
"Let's look on outliers on the satellite image level"
35013489
]
35023490
},
35033491
{
@@ -4542,13 +4530,11 @@
45424530
]
45434531
},
45444532
{
4545-
"cell_type": "code",
4546-
"execution_count": 22,
4547-
"id": "f7998fe4-db21-4c06-aca6-3287119b74d2",
4533+
"cell_type": "markdown",
4534+
"id": "60ee12c8",
45484535
"metadata": {},
4549-
"outputs": [],
45504536
"source": [
4551-
"# Now we look at outliers at the crop level"
4537+
"Now we look at outliers at the crop level"
45524538
]
45534539
},
45544540
{
@@ -5600,13 +5586,13 @@
56005586
]
56015587
},
56025588
{
5603-
"cell_type": "code",
5604-
"execution_count": null,
5605-
"id": "47cfd1cc-7db6-4256-9550-62ab7fe3e81e",
5589+
"cell_type": "markdown",
5590+
"id": "aa35647a",
56065591
"metadata": {},
5607-
"outputs": [],
56085592
"source": [
5609-
"# We look for the brightest satellite images"
5593+
"## Brightest Image\n",
5594+
"\n",
5595+
"We look for the brightest satellite images"
56105596
]
56115597
},
56125598
{
@@ -6652,13 +6638,12 @@
66526638
]
66536639
},
66546640
{
6655-
"cell_type": "code",
6656-
"execution_count": null,
6657-
"id": "9711f363-9d0f-4d42-b4cd-66f5f9ab1b00",
6641+
"cell_type": "markdown",
6642+
"id": "73a82a89",
66586643
"metadata": {},
6659-
"outputs": [],
66606644
"source": [
6661-
"# Now we look for the most blurry images"
6645+
"## Blurry Images \n",
6646+
"Now we look for the most blurry images"
66626647
]
66636648
},
66646649
{

0 commit comments

Comments
 (0)