forked from kornia/kornia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change sold2 detector config to dataclass (kornia#2880)
* Introduce dataclasses for discussion * Add dict_to_dataclass function * Add dataclass_to_dict function * Update SOLD2_detector to use newly introduced dataclasses * Remove default_detector_cfg dict * Remove comment * Extend LineDetectorCfg to all configs used in LineSegmentDetectionModule * Update LineSegmentDetectionModule init to use LineDetectorCfg dataclass * Update LineSegmentDetectinoModule docstring * Update SOLD2_detector docstring * Update LineSegmentDetectionModule call to use its dataclass * Remove dict_to_dataclass since its not used * Add DeprecationWarning for dict as config in favour of dataclass config Co-authored-by: João Gustavo A. Amorim <[email protected]> * Fix DeprecationWarning * Fix downstream errors of dataclass changes and typos LineDetectorCfg * Add typing to dict_to_dataclass and dataclass_to_dict functions * Fix typ checking * Update dataclass typing to Any Co-authored-by: João Gustavo A. Amorim <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update dict_to_dataclass to TypeVar typing Co-authored-by: João Gustavo A. Amorim <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move dataclass_to_dict and dict_to_dataclass to kornia/utils/helpers.py * Fix type checking errors in dict_to_dataclass by bounding TypeVar to dataclass type * Remove any from dict to dataclass * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: João Gustavo A. Amorim <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
f0ed53e
commit e34ed3c
Showing
4 changed files
with
169 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.