Skip to content

Commit 70daf4b

Browse files
author
Immanuel Bayer
committed
0.8.1
1 parent f82ef21 commit 70daf4b

13 files changed

Lines changed: 82 additions & 30 deletions

CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## [0.8.1] - 2022-04-09
11+
12+
### Changed
13+
- Refactored notebooks to use python to handle folder structure instead of linux commands by [Ítalo Epifânio](https://github.com/itepifanio).
14+
15+
### Added
16+
- [tqdm](itlab.palaimon.io/products/ipyannotator/ipyannotator/-/merge_requests) dependency [Ítalo Epifânio](https://github.com/itepifanio).
17+
- Doc section explaining Ipyannotator dev dependencies [Ítalo Epifânio](https://github.com/itepifanio).
18+
19+
## [0.8.0] - 2022-04-09
20+
1021
### Changed
11-
- Allow user to use labels without using directories.
12-
- Refactor Im2Im and Capture annotators to render any widget on grid menu.
22+
- Make the creation of new label classes more flexible and decouple it from the folder structure by [Ítalo Epifânio](https://github.com/itepifanio).
23+
- Refactored Im2Im and Capture annotators to render any widget on grid menu by [Ítalo Epifânio](https://github.com/itepifanio).
24+
- Replaced exception with warning when using the same file storage on multiple annotators by [Ítalo Epifânio](https://github.com/itepifanio).
25+
26+
### Added
27+
- New `fit_canvas` option to adjust images to the size of the canvas by [Ítalo Epifânio](https://github.com/itepifanio).
28+
- Annotator step (explore, create, improve) can be recovered when using Ipyannotator API by [Ítalo Epifânio](https://github.com/itepifanio).
29+
- New documentation theme and structure by [Carlos Cerqueira](https://github.com/Carloscerq) and [Ítalo Epifânio](https://github.com/itepifanio).
1330

1431
## [0.7.0] - 2022-02-19
1532

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,14 @@ This library has been written in the [literate programming style](https://en.wik
5858
jupyter notebooks by [nbdev](https://www.fast.ai/2019/12/02/nbdev/). Please explore the jupyter notebooks in `nbs/` to learn more about
5959
the inner working of ipyannotator.
6060

61+
The notebooks contains the development dependencies:
62+
[pytest](https://docs.pytest.org/en/7.1.x/) and [ipytest](https://github.com/chmp/ipytest),
63+
if you want to run the notebooks remove the tests or install the libraries mentioned.
6164

6265
Also check out the following notebook for a more high level overview.
6366

64-
- Tutorial demonstrating how ipyannotator can be seamlessly integrated in your
65-
    data science workflow. `nbs/08_tutorial_road_damage.ipynb`
66-
- [Recoding of jupytercon 2020](https://www.youtube.com/watch?v=jFAp1s1O8Hg) talk explaining the high level concepts / vision
67-
of ipyannotator.
67+
- Tutorial demonstrating how ipyannotator can be seamlessly integrated in your data science workflow. `nbs/08_tutorial_road_damage.ipynb`
68+
- [Recoding of jupytercon 2020](https://www.youtube.com/watch?v=jFAp1s1O8Hg) talk explaining the high level concepts / vision of ipyannotator.
6869

6970
## Jupyter lab trouble shooting
7071

docs/tutorials.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Ipyannotator uses tutorials to demonstrate how the library can be used.
66
All tutorials are statically generated from jupyter notebooks.
77
All notebooks can be found on our `Github's repository <https://github.com/palaimon/ipyannotator/tree/main/nbs>`_
88

9+
The notebooks contains the development dependencies:
10+
[pytest](https://docs.pytest.org/en/7.1.x/) and [ipytest](https://github.com/chmp/ipytest),
11+
if you want to run the notebooks remove the tests or install the libraries mentioned.
12+
913
.. toctree::
1014
:maxdepth: 1
1115

ipyannotator/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.8.0"
1+
__version__ = "0.8.1"

nbs/01_helpers.ipynb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,18 @@
207207
"with open(annot_file, 'w') as f:\n",
208208
" json.dump(annotations, f, indent=2)\n",
209209
"\n",
210-
"reconstruct_class_images(fol, annot_file)\n",
211-
"\n",
210+
"reconstruct_class_images(fol, annot_file)"
211+
]
212+
},
213+
{
214+
"cell_type": "code",
215+
"execution_count": null,
216+
"metadata": {},
217+
"outputs": [],
218+
"source": [
219+
"#hide\n",
212220
"#check if generated\n",
213-
"!ls {fol}"
221+
"os.listdir(fol)"
214222
]
215223
},
216224
{

nbs/01b_dataset_video.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,8 @@
492492
"outputs": [],
493493
"source": [
494494
"#hide\n",
495-
"! ls {tmp_dir.name}/\"img\""
495+
"import os\n",
496+
"os.listdir(f'{tmp_dir.name}/img')"
496497
]
497498
},
498499
{

nbs/01b_tutorial_image_classification.ipynb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"outputs": [],
2929
"source": [
3030
"# hide\n",
31+
"import os\n",
3132
"import json\n",
33+
"import shutil\n",
3234
"import ipywidgets as widgets\n",
3335
"\n",
3436
"from pathlib import Path\n",
@@ -230,14 +232,18 @@
230232
"metadata": {},
231233
"outputs": [],
232234
"source": [
235+
"dirpath = ''\n",
233236
"if dataset == DS.ARTIFICIAL_CLASSIFICATION:\n",
234-
" ! rm -rf data/artificial_classification/create_results\n",
237+
" dirpath = 'data/artificial_classification/create_results'\n",
235238
"elif dataset == DS.CIFAR10:\n",
236-
" ! rm -rf data/cifar10/create_results\n",
239+
" dirpath = 'data/cifar10/create_results'\n",
237240
"elif dataset == DS.OXFORD102:\n",
238-
" ! rm -rf data/oxford-102-flowers/create_results\n",
241+
" dirpath = 'data/oxford-102-flowers/create_results'\n",
239242
"elif dataset == DS.CUB200:\n",
240-
" ! rm -rf data/CUB_200_2011/create_results"
243+
" dirpath = 'data/CUB_200_2011/create_results'\n",
244+
"\n",
245+
"if os.path.exists(dirpath) and os.path.isdir(dirpath):\n",
246+
" shutil.rmtree(dirpath)"
241247
]
242248
},
243249
{

nbs/01c_tutorial_bbox.ipynb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@
2929
"source": [
3030
"# hide\n",
3131
"import os\n",
32-
"\n",
32+
"import shutil\n",
3333
"import numpy as np\n",
3434
"import pandas as pd\n",
35-
"from tqdm import tqdm\n",
3635
"import ipywidgets as widgets\n",
3736
"from pathlib import Path\n",
3837
"from IPython.display import JSON\n",
@@ -209,7 +208,9 @@
209208
"outputs": [],
210209
"source": [
211210
"if dataset == DS.ARTIFICIAL_DETECTION:\n",
212-
" ! rm -rf data/artificial_detection/create_results"
211+
" dirpath = 'data/artificial_detection/create_results'\n",
212+
" if os.path.exists(dirpath) and os.path.isdir(dirpath):\n",
213+
" shutil.rmtree(dirpath)"
213214
]
214215
},
215216
{
@@ -273,7 +274,9 @@
273274
"outputs": [],
274275
"source": [
275276
"if dataset == DS.ARTIFICIAL_DETECTION:\n",
276-
" ! rm -rf data/artificial_detection/create_results/missed"
277+
" dirpath = 'data/artificial_detection/create_results/missed'\n",
278+
" if os.path.exists(dirpath) and os.path.isdir(dirpath):\n",
279+
" shutil.rmtree(dirpath)"
277280
]
278281
},
279282
{

nbs/01d_tutorial_video_annotator.ipynb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
"outputs": [],
3232
"source": [
3333
"# hide\n",
34+
"import os\n",
3435
"import json\n",
36+
"import shutil\n",
3537
"from ipyannotator.annotator import Annotator\n",
3638
"from ipyannotator.base import Settings\n",
3739
"from ipyannotator.mltypes import InputImage, OutputVideoBbox, NoOutput\n",
@@ -199,7 +201,9 @@
199201
"metadata": {},
200202
"outputs": [],
201203
"source": [
202-
"! rm -rf data/artificial/create_results"
204+
"dirpath = 'data/artificial/create_results'\n",
205+
"if os.path.exists(dirpath) and os.path.isdir(dirpath):\n",
206+
" shutil.rmtree(dirpath)"
203207
]
204208
},
205209
{

nbs/03_storage.ipynb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,15 @@
247247
"source": [
248248
"# hide\n",
249249
"#generate imdir/classdir/class.jpg structure\n",
250-
"\n",
251-
"!mkdir -p ../data/test_step_down/{one,two,three}\n",
250+
"subfolders = ['one', 'two', 'three']\n",
251+
"for subfolder in subfolders:\n",
252+
" directory = '../data/test_step_down'\n",
253+
" if not os.path.exists(directory):\n",
254+
" os.mkdir(directory)\n",
255+
"\n",
256+
" directory = f'{directory}/{subfolder}'\n",
257+
" if not os.path.exists(directory):\n",
258+
" os.mkdir(directory)\n",
252259
"\n",
253260
"from PIL import Image\n",
254261
"\n",

0 commit comments

Comments
 (0)