All modules for which code is available
84 |- pylabel.analyze 85 |
- pylabel.dataset 86 |
- pylabel.exporter 87 |
- pylabel.importer 88 |
- pylabel.labeler 89 |
- pylabel.splitter 90 |
- pylabel.visualize 91 |
├── .github
├── CONTRIBUTING.md
├── FUNDING.yml
└── workflows
│ ├── push-pr-ci.yml
│ ├── python-publish-pre.yml
│ └── python-publish.yml
├── .gitignore
├── .readthedocs.yaml
├── .vscode
└── settings.json
├── LICENSE.txt
├── README.md
├── build.sh
├── docs
├── Makefile
├── _build
│ ├── doctrees
│ │ ├── environment.pickle
│ │ ├── index.doctree
│ │ ├── modules.doctree
│ │ └── pylabel.doctree
│ └── html
│ │ ├── .buildinfo
│ │ ├── .doctrees
│ │ ├── index.doctree
│ │ ├── modules.doctree
│ │ └── pylabel.doctree
│ │ ├── _modules
│ │ ├── index.html
│ │ └── pylabel
│ │ │ ├── analyze.html
│ │ │ ├── dataset.html
│ │ │ ├── exporter.html
│ │ │ ├── importer.html
│ │ │ ├── labeler.html
│ │ │ ├── splitter.html
│ │ │ └── visualize.html
│ │ ├── _sources
│ │ ├── index.rst.txt
│ │ ├── modules.rst.txt
│ │ └── pylabel.rst.txt
│ │ ├── _static
│ │ ├── basic.css
│ │ ├── css
│ │ │ ├── badge_only.css
│ │ │ ├── fonts
│ │ │ │ ├── Roboto-Slab-Bold.woff
│ │ │ │ ├── Roboto-Slab-Bold.woff2
│ │ │ │ ├── Roboto-Slab-Regular.woff
│ │ │ │ ├── Roboto-Slab-Regular.woff2
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.svg
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ ├── fontawesome-webfont.woff
│ │ │ │ ├── fontawesome-webfont.woff2
│ │ │ │ ├── lato-bold-italic.woff
│ │ │ │ ├── lato-bold-italic.woff2
│ │ │ │ ├── lato-bold.woff
│ │ │ │ ├── lato-bold.woff2
│ │ │ │ ├── lato-normal-italic.woff
│ │ │ │ ├── lato-normal-italic.woff2
│ │ │ │ ├── lato-normal.woff
│ │ │ │ └── lato-normal.woff2
│ │ │ └── theme.css
│ │ ├── doctools.js
│ │ ├── documentation_options.js
│ │ ├── file.png
│ │ ├── jquery-3.5.1.js
│ │ ├── jquery.js
│ │ ├── js
│ │ │ ├── badge_only.js
│ │ │ ├── html5shiv-printshiv.min.js
│ │ │ ├── html5shiv.min.js
│ │ │ └── theme.js
│ │ ├── language_data.js
│ │ ├── minus.png
│ │ ├── plus.png
│ │ ├── pygments.css
│ │ ├── searchtools.js
│ │ ├── underscore-1.13.1.js
│ │ └── underscore.js
│ │ ├── genindex.html
│ │ ├── index.html
│ │ ├── modules.html
│ │ ├── objects.inv
│ │ ├── py-modindex.html
│ │ ├── pylabel.html
│ │ ├── search.html
│ │ └── searchindex.js
├── conf.py
├── index.rst
├── make.bat
├── modules.rst
├── pylabel.rst
└── requirements.txt
├── pylabel
├── __init__.py
├── analyze.py
├── dataset.py
├── exporter.py
├── importer.py
├── labeler.py
├── shared.py
├── splitter.py
└── visualize.py
├── requirements.txt
├── setup.py
└── tests
├── README.md
├── __init__.py
└── test_main.py
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to PyLabel
2 | Thank you for your interest in contributing to PyLabel.
3 |
4 | **Run Validation Tests**
5 | Before making your pull request, please run the validation tests localy to ensure that your change has not impacted other areas. See instructions on running the tests here https://github.com/pylabel-project/pylabel/blob/dev/tests/README.md.
6 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | #These are supported funding model platforms
2 | open_collective: pylabel
3 |
--------------------------------------------------------------------------------
/.github/workflows/push-pr-ci.yml:
--------------------------------------------------------------------------------
1 | name: CI on push or pull request for python 3.9
2 |
3 | on:
4 | push:
5 | branches: [ main, dev ]
6 | pull_request:
7 | branches: [ main, dev ]
8 |
9 | jobs:
10 | build:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 | - name: Set up Python 3.9
17 | uses: actions/setup-python@v2
18 | with:
19 | python-version: "3.9"
20 | - name: Install dependencies
21 | run: |
22 | python -m pip install --upgrade pip
23 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
24 | - name: Test with pytest
25 | run: |
26 | pytest
27 | - name: Test notebooks with pytest + nbmake
28 | run: |
29 | pytest --nbmake "dataset_splitting.ipynb" "coco2voc.ipynb" "yolo2coco.ipynb" "yolo2voc.ipynb"
30 |
--------------------------------------------------------------------------------
/.github/workflows/python-publish-pre.yml:
--------------------------------------------------------------------------------
1 | # This workflow will upload a Python Package using Twine when a release is created
2 | # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3 |
4 | # This workflow uses actions that are not certified by GitHub.
5 | # They are provided by a third-party and are governed by
6 | # separate terms of service, privacy policy, and support
7 | # documentation.
8 |
9 |
10 | name: Publish Pre-Release Python Package
11 |
12 | on:
13 | release:
14 | types: [published]
15 | branches:
16 | - dev
17 | jobs:
18 | deploy:
19 |
20 | runs-on: ubuntu-latest
21 |
22 | steps:
23 | - uses: actions/checkout@v2
24 | - name: Set up Python
25 | uses: actions/setup-python@v2
26 | with:
27 | python-version: '3.8'
28 | - name: Install dependencies
29 | run: |
30 | python -m pip install --upgrade pip
31 | pip install build
32 | - name: Build package
33 | run: python -m build
34 | - name: Publish package
35 | uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
36 | with:
37 | user: __token__
38 | password: ${{ secrets.PYPI_API_TOKEN }}
39 |
--------------------------------------------------------------------------------
/.github/workflows/python-publish.yml:
--------------------------------------------------------------------------------
1 | # This workflow will upload a Python Package using Twine when a release is created
2 | # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3 |
4 | # This workflow uses actions that are not certified by GitHub.
5 | # They are provided by a third-party and are governed by
6 | # separate terms of service, privacy policy, and support
7 | # documentation.
8 |
9 |
10 | name: Publish Python Package
11 |
12 | on:
13 | release:
14 | types: [published]
15 | branches: [ main ]
16 |
17 | jobs:
18 | deploy:
19 |
20 | runs-on: ubuntu-latest
21 |
22 | steps:
23 | - uses: actions/checkout@v2
24 | - name: Set up Python
25 | uses: actions/setup-python@v2
26 | with:
27 | python-version: '3.8'
28 | - name: Install dependencies
29 | run: |
30 | python -m pip install --upgrade pip
31 | pip install build
32 | - name: Build package
33 | run: python -m build
34 | - name: Publish package
35 | uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
36 | with:
37 | user: __token__
38 | password: ${{ secrets.PYPI_API_TOKEN }}
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | penv/
2 | env/
3 | venv/
4 | .vscode/settings.json
5 | coco_instances_val2017.json
6 | mypythonlib.egg-info/
7 | dist/
8 | ./build/
9 | data/
10 | .eggs/
11 | pylabel.egg-info/
12 | *.ipynb
13 | pylabel/__pycache__/
14 | notebooks.sh
15 | training/
16 | annotations/
17 | images/
18 | roadsign_splitdata.zip
19 | road_sign_data.yaml
20 | BCCD_Dataset/
21 | model_training/
22 | __pycache__
23 | samples
--------------------------------------------------------------------------------
/.readthedocs.yaml:
--------------------------------------------------------------------------------
1 | # .readthedocs.yaml
2 | # Read the Docs configuration file
3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4 |
5 | # Required
6 | version: 2
7 |
8 | # Set the version of Python and other tools you might need
9 | build:
10 | os: ubuntu-22.04
11 | tools:
12 | python: "3.11"
13 |
14 | # Build documentation in the docs/ directory with Sphinx
15 | sphinx:
16 | configuration: docs/conf.py
17 |
18 | # We recommend specifying your dependencies to enable reproducible builds:
19 | # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20 | python:
21 | install:
22 | - requirements: docs/requirements.txt
23 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "githubPullRequests.ignoredPullRequestBranches": [
3 | "dev"
4 | ]
5 | }
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 PyLabel Team
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PyLabel
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | PyLabel is a Python package to help you prepare image datasets for computer vision models including PyTorch and YOLOv5. It can translate bounding box annotations between different formats. (For example, COCO to YOLO.) And it includes an AI-assisted labeling tool that runs in a Jupyter notebook.
16 |
17 | - **Translate:** Convert annotation formats with a single line of code:
18 | ```
19 | importer.ImportCoco(path_to_annotations).export.ExportToYoloV5()
20 | ```
21 | - **Analyze:** PyLabel stores annotatations in a pandas dataframe so you can easily perform analysis on image datasets.
22 | - **Split:** Divide image datasets into train, test, and val with stratification to get consistent class distribution.
23 | - **Label:** PyLabel also includes an image labeling tool that runs in a Jupyter notebook that can annotate images manually or perform automatic labeling using a pre-trained model.
24 | - **Visualize:** Render images from your dataset with bounding boxes overlaid so you can confirm the accuracy of the annotations.
25 |
26 |
27 | ## Tutorial Notebooks
28 | See PyLabel in action in these [sample Jupyter notebooks](https://github.com/pylabel-project/samples/):
29 | - [Convert COCO to YOLO](https://github.com/pylabel-project/samples/blob/main/coco2yolov5.ipynb)
30 | - [Convert COCO to VOC](https://github.com/pylabel-project/samples/blob/main/coco2voc.ipynb)
31 | - [Convert VOC to COCO](https://github.com/pylabel-project/samples/blob/main/voc2coco.ipynb)
32 | - [Convert YOLO to COCO](https://github.com/pylabel-project/samples/blob/main/yolo2coco.ipynb)
33 | - [Convert YOLO to VOC](https://github.com/pylabel-project/samples/blob/main/yolo2voc.ipynb)
34 | - [Import a YOLO YAML File](https://github.com/pylabel-project/samples/blob/main/yolo_with_yaml_importer.ipynb)
35 | - [Splitting Images Datasets into Train, Test, Val](https://github.com/pylabel-project/samples/blob/main/dataset_splitting.ipynb)
36 | - [Labeling Tool Demo with AI Assisted Labeling](https://github.com/pylabel-project/samples/blob/main/pylabeler.ipynb)
37 |
38 | Find more docs at https://pylabel.readthedocs.io.
39 |
40 | ## About PyLabel
41 | PyLabel was developed by Jeremy Fraenkel, Alex Heaton, and Derek Topper as the Capstope project for the Master of Information and Data Science (MIDS) at the UC Berkeley School of Information. If you have any questions or feedback please [create an issue](https://github.com/pylabel-project/pylabel/issues). Please let us know how we can make PyLabel more useful.
42 |
43 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | rm -r build/
2 | rm -r pylabel.egg-info/
3 | rm -r dist/
4 | Python setup.py sdist bdist_wheel
5 | twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
6 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/docs/_build/doctrees/environment.pickle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pylabel-project/pylabel/6e815ffd61b7d6ba3a1ab3d510b1e6d551e21d93/docs/_build/doctrees/environment.pickle
--------------------------------------------------------------------------------
/docs/_build/doctrees/index.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pylabel-project/pylabel/6e815ffd61b7d6ba3a1ab3d510b1e6d551e21d93/docs/_build/doctrees/index.doctree
--------------------------------------------------------------------------------
/docs/_build/doctrees/modules.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pylabel-project/pylabel/6e815ffd61b7d6ba3a1ab3d510b1e6d551e21d93/docs/_build/doctrees/modules.doctree
--------------------------------------------------------------------------------
/docs/_build/doctrees/pylabel.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pylabel-project/pylabel/6e815ffd61b7d6ba3a1ab3d510b1e6d551e21d93/docs/_build/doctrees/pylabel.doctree
--------------------------------------------------------------------------------
/docs/_build/html/.buildinfo:
--------------------------------------------------------------------------------
1 | # Sphinx build info version 1
2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3 | config: 1313101fa6f04cd3f284c7e8344acc16
4 | tags: 645f666f9bcd5a90fca523b33c5a78b7
5 |
--------------------------------------------------------------------------------
/docs/_build/html/.doctrees/index.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pylabel-project/pylabel/6e815ffd61b7d6ba3a1ab3d510b1e6d551e21d93/docs/_build/html/.doctrees/index.doctree
--------------------------------------------------------------------------------
/docs/_build/html/.doctrees/modules.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pylabel-project/pylabel/6e815ffd61b7d6ba3a1ab3d510b1e6d551e21d93/docs/_build/html/.doctrees/modules.doctree
--------------------------------------------------------------------------------
/docs/_build/html/.doctrees/pylabel.doctree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pylabel-project/pylabel/6e815ffd61b7d6ba3a1ab3d510b1e6d551e21d93/docs/_build/html/.doctrees/pylabel.doctree
--------------------------------------------------------------------------------
/docs/_build/html/_modules/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
80 | """The dataset is the primary object that you will interactive with when using PyLabel.
81 | All other modules are sub-modules of the dataset object.
82 | """
83 |
84 | from pylabel.analyze import Analyze
85 | from pylabel.exporter import Export
86 | from pylabel.visualize import Visualize
87 | from pylabel.labeler import Labeler
88 | from pylabel.splitter import Split
89 | from pylabel.shared import _ReindexCatIds
90 |
91 | import numpy as np
92 |
93 |
94 | [docs]class Dataset:
95 | def __init__(self, df):
96 | self.df = df
97 | """Pandas Dataframe: The dataframe where annotations are stored. This dataframe can be read directly
98 | to query the contents of the dataset. You can also edit this dataframe to filter records or edit the
99 | annotations directly.
100 |
101 | Example:
102 | >>> dataset.df
103 | """
104 | self.name = "dataset"
105 | """string: Default is 'dataset'. A friendly name for your dataset that is used as part of the filename(s)
106 | when exporting annotation files.
107 | """
108 | self.path_to_annotations = ""
109 | """string: Default is ''. The path to the annotation files associated with the dataset. When importing,
110 | this will be path to the directory where the annotations are stored. By default, annotations will be exported
111 | to the same directory. Changing this value will change where the annotations are exported to.
112 | """
113 | self.export = Export(dataset=self)
114 | """See pylabel.export module."""
115 | self.visualize = Visualize(dataset=self)
116 | """See pylabel.visualize module."""
117 | self.analyze = Analyze(dataset=self)
118 | """See pylabel.analyze module."""
119 | self.labeler = Labeler(self)
120 | """See pylabel.labeler module."""
121 | self.splitter = Split(dataset=self)
122 | """See pylabel.splitter module."""
123 |
124 | [docs] def ReindexCatIds(self, cat_id_index=0):
125 | """
126 | Reindex the values of the cat_id column so that that they start from an int (usually 0 or 1) and
127 | then increment the cat_ids to index + number of categories.
128 | It's useful if the cat_ids are not continuous, especially for dataset subsets,
129 | or combined multiple datasets. Some models like Yolo require starting from 0 and others
130 | like Detectron require starting from 1.
131 |
132 | Args:
133 | cat_id_index (int): Defaults to 0.
134 | The cat ids will increment sequentially the cat_index value. For example if there are 10
135 | classes then the cat_ids will be a range from 0-9.
136 |
137 | Example:
138 | >>> dataset.analyze.class_ids
139 | [1,2,4,5,6,7,8,9,11,12]
140 | >>> dataset.ReindexCatIds(cat_id_index) = 0
141 | >>> dataset.analyze.class_ids
142 | [0,1,2,3,4,5,6,7,8,9]
143 | """
144 | assert isinstance(cat_id_index, int), "cat_id_index must be an int."
145 | _ReindexCatIds(self.df, cat_id_index)
146 |
80 | import bbox_visualizer as bbv
81 | import cv2
82 | from PIL import Image
83 | from pathlib import Path
84 |
85 | [docs]class Visualize:
86 | def __init__(self, dataset=None):
87 | self.dataset = dataset
88 |
89 | """Functions to visualize inspect images and annotations."""
90 | [docs] def ShowBoundingBoxes(self, img_id:int=0, img_filename:str="") -> Image:
91 | """Enter a filename or index number and return the image with the bounding boxes drawn."""
92 |
93 | ds = self.dataset
94 |
95 | #Handle cases where user enters image name in default field
96 | if type(img_id) == str:
97 | img_filename = img_id
98 |
99 | if img_filename == "":
100 | df_single_img_annots = ds.df.loc[ds.df.img_id == img_id]
101 | else:
102 | df_single_img_annots = ds.df.loc[ds.df.img_filename == img_filename]
103 |
104 | full_image_path = str(Path(ds.path_to_annotations, df_single_img_annots.iloc[0].img_folder, df_single_img_annots.iloc[0].img_filename))
105 | img = cv2.imread(str(full_image_path))
106 | img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
107 |
108 | labels = []
109 | bboxes = []
110 |
111 | for index, row in df_single_img_annots.iterrows():
112 | labels.append(row['cat_name'])
113 | bboxes.append([int(row['ann_bbox_xmin']),int(row['ann_bbox_ymin']),int(row['ann_bbox_xmax']),int(row['ann_bbox_ymax'])])
114 |
115 | img_with_boxes = bbv.draw_multiple_rectangles(img, bboxes)
116 | img_with_boxes = bbv.add_multiple_labels(img_with_boxes, labels, bboxes)
117 |
118 | rendered_img = Image.fromarray(img_with_boxes)
119 | #rendered_img.save("bbox-visualizer/jpeg.jpg")
120 | return rendered_img
121 |
122 |
' + _('Hide Search Matches') + '
') 239 | .appendTo($('#searchbox')); 240 | } 241 | }, 242 | 243 | /** 244 | * init the domain index toggle buttons 245 | */ 246 | initIndexTable : function() { 247 | var togglers = $('img.toggler').click(function() { 248 | var src = $(this).attr('src'); 249 | var idnum = $(this).attr('id').substr(7); 250 | $('tr.cg-' + idnum).toggle(); 251 | if (src.substr(-9) === 'minus.png') 252 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 253 | else 254 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 255 | }).css('display', ''); 256 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 257 | togglers.click(); 258 | } 259 | }, 260 | 261 | /** 262 | * helper function to hide the search marks again 263 | */ 264 | hideSearchWords : function() { 265 | $('#searchbox .highlight-link').fadeOut(300); 266 | $('span.highlighted').removeClass('highlighted'); 267 | }, 268 | 269 | /** 270 | * make the url absolute 271 | */ 272 | makeURL : function(relativeURL) { 273 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 274 | }, 275 | 276 | /** 277 | * get the current relative url 278 | */ 279 | getCurrentURL : function() { 280 | var path = document.location.pathname; 281 | var parts = path.split(/\//); 282 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 283 | if (this === '..') 284 | parts.pop(); 285 | }); 286 | var url = parts.join('/'); 287 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 288 | }, 289 | 290 | initOnKeyListeners: function() { 291 | $(document).keydown(function(event) { 292 | var activeElementType = document.activeElement.tagName; 293 | // don't navigate when in search box, textarea, dropdown or button 294 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' 295 | && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey 296 | && !event.shiftKey) { 297 | switch (event.keyCode) { 298 | case 37: // left 299 | var prevHref = $('link[rel="prev"]').prop('href'); 300 | if (prevHref) { 301 | window.location.href = prevHref; 302 | return false; 303 | } 304 | break; 305 | case 39: // right 306 | var nextHref = $('link[rel="next"]').prop('href'); 307 | if (nextHref) { 308 | window.location.href = nextHref; 309 | return false; 310 | } 311 | break; 312 | } 313 | } 314 | }); 315 | } 316 | }; 317 | 318 | // quick alias for translations 319 | _ = Documentation.gettext; 320 | 321 | $(document).ready(function() { 322 | Documentation.init(); 323 | }); 324 | -------------------------------------------------------------------------------- /docs/_build/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '0.1.30', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /docs/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pylabel-project/pylabel/6e815ffd61b7d6ba3a1ab3d510b1e6d551e21d93/docs/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs/_build/html/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/_build/html/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="
|
109 |
|
113 |
|
121 |
|
127 |
|
135 |
|
139 |
|
149 |
|
157 |
|
165 |
|
175 |
|
183 |
|
191 |
|
195 |
|
224 |
|
232 |
|
238 |
|
274 |
|
311 |
|
319 |
|
331 |
|
339 |
|
347 |
|
355 |
|
359 |
Documentation for the the PyLabel package at https://github.com/pylabel-project/pylabel/
89 |Documentation :
91 |Integrations :
109 |96 | p | ||
100 | |
101 | pylabel | 102 | |
105 | |
106 | pylabel.analyze | 107 | |
110 | |
111 | pylabel.dataset | 112 | |
115 | |
116 | pylabel.exporter | 117 | |
120 | |
121 | pylabel.importer | 122 | |
125 | |
126 | pylabel.labeler | 127 | |
130 | |
131 | pylabel.shared | 132 | |
135 | |
136 | pylabel.splitter | 137 | |
140 | |
141 | pylabel.visualize | 142 | |