Skip to content

Commit

Permalink
cosmetic changes, small bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Jan 5, 2024
1 parent 0313731 commit e410350
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
Empty file removed data/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion docs/requirements.txt

This file was deleted.

2 changes: 2 additions & 0 deletions examples/COCO_people_subset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
"output_zip = \"../data/COCO_people_subset.zip\"\n",
"output_folder = \"../data/\"\n",
"\n",
"if not os.path.exists(output_folder):\n",
" os.mkdir(output_folder)\n",
"# Check if the data already exists\n",
"if not os.path.exists(output_zip) and not os.path.exists(\n",
" os.path.join(output_folder, \"COCO_people_subset\")\n",
Expand Down
3 changes: 1 addition & 2 deletions luxonis_ml/data/augmentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
KeypointType,
)

from luxonis_ml.enums import LabelType
from luxonis_ml.utils.registry import Registry

from .loader import LabelType

AUGMENTATIONS = Registry(name="augmentations")


Expand Down
42 changes: 21 additions & 21 deletions luxonis_ml/data/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@
"""


def parsing_wrapper(func: Callable) -> Callable:
"""Wrapper for parsing functions that adds data to LDF.
@type func: Callable
@param func: Parsing function
@rtype: Callable
@return: Wrapper function
"""

def wrapper(*args, **kwargs):
dataset = args[0].dataset
generator, class_names, skeletons, added_images = func(*args, **kwargs)
dataset.set_classes(class_names)
dataset.set_skeletons(skeletons)
dataset.add(generator)

return added_images

return wrapper


class LuxonisParser:
def __init__(self, **ldf_kwargs):
"""A parser class used for parsing common dataset formats to LDF.
Expand All @@ -36,27 +57,6 @@ def __init__(self, **ldf_kwargs):
)
self.dataset = LuxonisDataset(**ldf_kwargs)

@staticmethod
def parsing_wrapper(func: Callable) -> Callable:
"""Wrapper for parsing functions that adds data to LDF.
@type func: Callable
@param func: Parsing function
@rtype: Callable
@return: Wrapper function
"""

def wrapper(*args, **kwargs):
dataset = args[0].dataset
generator, class_names, skeletons, added_images = func(*args, **kwargs)
dataset.set_classes(class_names)
dataset.set_skeletons(skeletons)
dataset.add(generator)

return added_images

return wrapper

def parse_dir(
self,
dataset_type: DatasetType,
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "luxonis-ml"
version = "0.0.1"
description = "This package provides MLOps tools for training models for OAK devices"
description = "MLOps tools for training models for Luxonis devices"
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
Expand All @@ -10,7 +10,7 @@ maintainers = [{ name = "Luxonis", email = "support@luxonis.com" }]
keywords = ["ml", "ops", "camera", "luxonis", "oak"]
dynamic = ["dependencies", "optional-dependencies"]
classifiers = [
"License :: Apache License 2.0",
"License :: OSI Approved :: Apache Software License",
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand All @@ -24,8 +24,8 @@ classifiers = [
luxonis_ml = "luxonis_ml.luxonis_ml:main"

[project.urls]
repository = "https://github.com/luxonis/models"
issues = "https://github.com/luxonis/models/issues"
repository = "https://github.com/luxonis/luxonis-ml"
issues = "https://github.com/luxonis/luxonis-ml/issues"

[build-system]
requires = ["setuptools", "wheel"]
Expand Down

0 comments on commit e410350

Please sign in to comment.