Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ppizarror committed Aug 12, 2024
1 parent 73366b7 commit 6818cb5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
25 changes: 14 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

======================
MLSTRUCT_FP-benchmarks
MLSTRUCT-FP_benchmarks
======================

.. image:: https://img.shields.io/github/actions/workflow/status/MLSTRUCT/MLSTRUCT-FP_benchmarks/ci.yml?branch=master
Expand All @@ -15,7 +15,7 @@ MLSTRUCT_FP-benchmarks
:target: https://opensource.org/licenses/MIT
:alt: License MIT

Benchmarks of MLStructFP dataset.
Benchmarks of `MLSTRUCT-FP <https://github.com/MLSTRUCT/MLSTRUCT-FP>`_ dataset.


Description
Expand All @@ -29,22 +29,25 @@ jupyter notebook files (in order) for more information and a quick start:
- `fp_unet <https://github.com/MLSTRUCT/MLSTRUCT-FP_benchmarks/blob/master/fp_unet.ipynb>`_: Creates U-Net model for wall segmentation
- `vectorization <https://github.com/MLSTRUCT/MLSTRUCT-FP_benchmarks/blob/master/vectorization.ipynb>`_: Vectorizes a model using Egiazarian et al. method

The weights for the best model (no_rot_256_50) can be downloaded at `this link <https://drive.google.com/file/d/15ufkjoWOFyT0Cm-MEc9zQJCDJIooOgh7/view?usp=sharing>`_.


Citing
------

.. code-block:: tex

@article{Pizarro2023,
title = {Large-scale multi-unit floor plan dataset for architectural plan analysis and recognition},
journal = {Automation in Construction},
volume = {156},
pages = {105132},
year = {2023},
issn = {0926-5805},
doi = {https://doi.org/10.1016/j.autcon.2023.105132},
url = {https://www.sciencedirect.com/science/article/pii/S0926580523003928},
author = {Pablo N. Pizarro and Nancy Hitschfeld and Ivan Sipiran}
title = {Large-scale multi-unit floor plan dataset for architectural plan analysis and
recognition},
journal = {Automation in Construction},
volume = {156},
pages = {105132},
year = {2023},
issn = {0926-5805},
doi = {https://doi.org/10.1016/j.autcon.2023.105132},
url = {https://www.sciencedirect.com/science/article/pii/S0926580523003928},
author = {Pablo N. Pizarro and Nancy Hitschfeld and Ivan Sipiran}
}


Expand Down
5 changes: 0 additions & 5 deletions create_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,10 @@
],
"source": [
"from MLStructFP.db import DbLoader\n",
"from MLStructFP.db.image import *\n",
"\n",
"from MLStructFP_benchmarks.ml.model.core import DataFloorPhoto\n",
"from MLStructFP_benchmarks.utils import FloorPatchGenerator, FPDatasetGenerator\n",
"\n",
"from matplotlib import pyplot as plt\n",
"import matplotlib.image as mpimg\n",
"import numpy as np\n",
"import time\n",
"import plotly.offline as pyo\n",
"\n",
"pyo.init_notebook_mode()"
Expand Down
12 changes: 5 additions & 7 deletions fp_unet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@
"source": [
"from MLStructFP_benchmarks.ml.model.architectures import *\n",
"from MLStructFP_benchmarks.ml.model.core import *\n",
"from MLStructFP_benchmarks.ml.utils import binary_accuracy_metric, iou_metric\n",
"from MLStructFP_benchmarks.ml.utils import iou_metric\n",
"from MLStructFP_benchmarks.utils import *\n",
"from MLStructFP.db import DbLoader\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import tensorflow as tf\n",
"\n",
Expand Down Expand Up @@ -434,10 +433,7 @@
"id": "89120cd3",
"metadata": {},
"outputs": [],
"source": [
"db = DbLoader('../MLSTRUCT-FP/dataset/fp.json')\n",
"test_data = data.load_part(2, False)"
]
"source": "test_data = data.load_part(2, False)"
},
{
"cell_type": "code",
Expand All @@ -452,7 +448,7 @@
" print(f'IoU: {iou_metric(img_true, model.predict_image(img_in)):.2f}')\n",
" model.plot.plot_predict(img_in, img_true, threshold=False, title=title)\n",
"\n",
"def plot_floor(image_size: float, patch_size: float, floor) -> None:\n",
"def plot_floor(image_size: int, patch_size: float, floor) -> None:\n",
" patchgen = FloorPatchGenerator(image_size=image_size, patch_size=patch_size, bw=True)\n",
" patchgen.plot_patches(floor, photo=1, patches=False, rect=False, axis=False,\n",
" save=f'.out/full/{floor.id}_c.png')\n",
Expand All @@ -463,6 +459,8 @@
" patchgen.plot_model(floor, model, f'.out/model/{floor.id}.png', outline=False)\n",
" patchgen.plot_model(floor, model, f'.out/model/{floor.id}_outline.png', outline=True)\n",
"\n",
"\n",
"# noinspection PyProtectedMember\n",
"def plot_full(plan_idx: int, patch_size: float):\n",
" plan_id = data._split[1][plan_idx] # Consider only test floor plans\n",
" for f in db.floors:\n",
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'MLStructFP >= 0.6.0',
'numpy <= 1.18.5',
'Pillow >= 10.4.0',
'plotly >= 5.23.0',
'scikit-image <= 0.18.1',
'scikit-learn >= 1.3.2'
]
Expand Down

0 comments on commit 6818cb5

Please sign in to comment.