Skip to content

Commit

Permalink
pyhumps dependency removed, converting to pascal case is added as hel…
Browse files Browse the repository at this point in the history
…per function.
  • Loading branch information
devrimcavusoglu committed Jul 8, 2022
1 parent 57999f6 commit c009bd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions pybboxes/types/bbox.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
from importlib import import_module
from typing import Tuple, Union

import humps

from pybboxes.types.base import BaseBoundingBox


def load_bbox(
name: str, values, image_size: Tuple[int, int] = None, return_values: bool = False, from_voc: bool = False, **kwargs
) -> BaseBoundingBox:

def pascalize(snake_string: str) -> str:
return snake_string.title().replace("_", "")

module_name = f"{name}_bounding_box"
module_path = f"pybboxes.types.{module_name}"
klass_name = humps.pascalize(module_name)
klass_name = pascalize(module_name)
module = import_module(module_path)
klass = getattr(module, klass_name)
if from_voc:
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
numpy
pyhumps
numpy

0 comments on commit c009bd1

Please sign in to comment.