Skip to content

Commit

Permalink
0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Immanuel Bayer committed Apr 11, 2022
1 parent f82ef21 commit 70daf4b
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 30 deletions.
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [0.8.1] - 2022-04-09

### Changed
- Refactored notebooks to use python to handle folder structure instead of linux commands by [Ítalo Epifânio](https://github.com/itepifanio).

### Added
- [tqdm](itlab.palaimon.io/products/ipyannotator/ipyannotator/-/merge_requests) dependency [Ítalo Epifânio](https://github.com/itepifanio).
- Doc section explaining Ipyannotator dev dependencies [Ítalo Epifânio](https://github.com/itepifanio).

## [0.8.0] - 2022-04-09

### Changed
- Allow user to use labels without using directories.
- Refactor Im2Im and Capture annotators to render any widget on grid menu.
- Make the creation of new label classes more flexible and decouple it from the folder structure by [Ítalo Epifânio](https://github.com/itepifanio).
- Refactored Im2Im and Capture annotators to render any widget on grid menu by [Ítalo Epifânio](https://github.com/itepifanio).
- Replaced exception with warning when using the same file storage on multiple annotators by [Ítalo Epifânio](https://github.com/itepifanio).

### Added
- New `fit_canvas` option to adjust images to the size of the canvas by [Ítalo Epifânio](https://github.com/itepifanio).
- Annotator step (explore, create, improve) can be recovered when using Ipyannotator API by [Ítalo Epifânio](https://github.com/itepifanio).
- New documentation theme and structure by [Carlos Cerqueira](https://github.com/Carloscerq) and [Ítalo Epifânio](https://github.com/itepifanio).

## [0.7.0] - 2022-02-19

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ This library has been written in the [literate programming style](https://en.wik
jupyter notebooks by [nbdev](https://www.fast.ai/2019/12/02/nbdev/). Please explore the jupyter notebooks in `nbs/` to learn more about
the inner working of ipyannotator.

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

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

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

## Jupyter lab trouble shooting

Expand Down
4 changes: 4 additions & 0 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Ipyannotator uses tutorials to demonstrate how the library can be used.
All tutorials are statically generated from jupyter notebooks.
All notebooks can be found on our `Github's repository <https://github.com/palaimon/ipyannotator/tree/main/nbs>`_

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

.. toctree::
:maxdepth: 1

Expand Down
2 changes: 1 addition & 1 deletion ipyannotator/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.0"
__version__ = "0.8.1"
14 changes: 11 additions & 3 deletions nbs/01_helpers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,18 @@
"with open(annot_file, 'w') as f:\n",
" json.dump(annotations, f, indent=2)\n",
"\n",
"reconstruct_class_images(fol, annot_file)\n",
"\n",
"reconstruct_class_images(fol, annot_file)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#hide\n",
"#check if generated\n",
"!ls {fol}"
"os.listdir(fol)"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion nbs/01b_dataset_video.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,8 @@
"outputs": [],
"source": [
"#hide\n",
"! ls {tmp_dir.name}/\"img\""
"import os\n",
"os.listdir(f'{tmp_dir.name}/img')"
]
},
{
Expand Down
14 changes: 10 additions & 4 deletions nbs/01b_tutorial_image_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"outputs": [],
"source": [
"# hide\n",
"import os\n",
"import json\n",
"import shutil\n",
"import ipywidgets as widgets\n",
"\n",
"from pathlib import Path\n",
Expand Down Expand Up @@ -230,14 +232,18 @@
"metadata": {},
"outputs": [],
"source": [
"dirpath = ''\n",
"if dataset == DS.ARTIFICIAL_CLASSIFICATION:\n",
" ! rm -rf data/artificial_classification/create_results\n",
" dirpath = 'data/artificial_classification/create_results'\n",
"elif dataset == DS.CIFAR10:\n",
" ! rm -rf data/cifar10/create_results\n",
" dirpath = 'data/cifar10/create_results'\n",
"elif dataset == DS.OXFORD102:\n",
" ! rm -rf data/oxford-102-flowers/create_results\n",
" dirpath = 'data/oxford-102-flowers/create_results'\n",
"elif dataset == DS.CUB200:\n",
" ! rm -rf data/CUB_200_2011/create_results"
" dirpath = 'data/CUB_200_2011/create_results'\n",
"\n",
"if os.path.exists(dirpath) and os.path.isdir(dirpath):\n",
" shutil.rmtree(dirpath)"
]
},
{
Expand Down
11 changes: 7 additions & 4 deletions nbs/01c_tutorial_bbox.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@
"source": [
"# hide\n",
"import os\n",
"\n",
"import shutil\n",
"import numpy as np\n",
"import pandas as pd\n",
"from tqdm import tqdm\n",
"import ipywidgets as widgets\n",
"from pathlib import Path\n",
"from IPython.display import JSON\n",
Expand Down Expand Up @@ -209,7 +208,9 @@
"outputs": [],
"source": [
"if dataset == DS.ARTIFICIAL_DETECTION:\n",
" ! rm -rf data/artificial_detection/create_results"
" dirpath = 'data/artificial_detection/create_results'\n",
" if os.path.exists(dirpath) and os.path.isdir(dirpath):\n",
" shutil.rmtree(dirpath)"
]
},
{
Expand Down Expand Up @@ -273,7 +274,9 @@
"outputs": [],
"source": [
"if dataset == DS.ARTIFICIAL_DETECTION:\n",
" ! rm -rf data/artificial_detection/create_results/missed"
" dirpath = 'data/artificial_detection/create_results/missed'\n",
" if os.path.exists(dirpath) and os.path.isdir(dirpath):\n",
" shutil.rmtree(dirpath)"
]
},
{
Expand Down
6 changes: 5 additions & 1 deletion nbs/01d_tutorial_video_annotator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"outputs": [],
"source": [
"# hide\n",
"import os\n",
"import json\n",
"import shutil\n",
"from ipyannotator.annotator import Annotator\n",
"from ipyannotator.base import Settings\n",
"from ipyannotator.mltypes import InputImage, OutputVideoBbox, NoOutput\n",
Expand Down Expand Up @@ -199,7 +201,9 @@
"metadata": {},
"outputs": [],
"source": [
"! rm -rf data/artificial/create_results"
"dirpath = 'data/artificial/create_results'\n",
"if os.path.exists(dirpath) and os.path.isdir(dirpath):\n",
" shutil.rmtree(dirpath)"
]
},
{
Expand Down
11 changes: 9 additions & 2 deletions nbs/03_storage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,15 @@
"source": [
"# hide\n",
"#generate imdir/classdir/class.jpg structure\n",
"\n",
"!mkdir -p ../data/test_step_down/{one,two,three}\n",
"subfolders = ['one', 'two', 'three']\n",
"for subfolder in subfolders:\n",
" directory = '../data/test_step_down'\n",
" if not os.path.exists(directory):\n",
" os.mkdir(directory)\n",
"\n",
" directory = f'{directory}/{subfolder}'\n",
" if not os.path.exists(directory):\n",
" os.mkdir(directory)\n",
"\n",
"from PIL import Image\n",
"\n",
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ipyannotator"
version = "0.8.0"
version = "0.8.1"
description = "The infinitely hackable annotation framework"
authors = ["palaimon.io <oss@mail.palaimon.io>"]
license = "Apache License 2.0"
Expand All @@ -23,6 +23,7 @@ pooch = "^1.5.2"
ipython = "^8.0.1"
nbdev = "^1.2.0"
voila = "^0.3.1"
tqdm = "^4.64.0"

[tool.poetry.dev-dependencies]
jupyterlab = "^3.1.12"
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ author = Palaimon
author_email = oss@mail.palaimon.io
copyright = Palaimon GmbH
branch = master
version = 0.8.0
version = 0.8.1
min_python = 3.7
audience = Developers
language = English
Expand Down

0 comments on commit 70daf4b

Please sign in to comment.