-
-
Notifications
You must be signed in to change notification settings - Fork 939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: in_range filtering #2895
feat: in_range filtering #2895
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice patch. lgtm, only needs the green lights on CI
I need help to solve this errors. I don't know how to debug properly without doing commit and push every time. |
if it's some doc issue, you can check with make build-doc or make doctest... for testing falling cross OS, I would go with commit and push too |
@vgilabert94 could you rebase this one? i removed the CI with the issue |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@vgilabert94 i guess something is missing with the docstring format -- i suggest to run |
|
ok, i'll handle it |
* initial commit * add docs * add tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update docs * correct typing * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update tests and docs * change randn to rand * Modify docs indentation * correct docs and remove unused vars * add return_mask * Remove shape in doc * fix docs format --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: edgar <[email protected]>
* refactor: store sold2_detector config dataclasses in utils/structures.py * fix: update path to DetectorCfg in Docstring * Move structures.py and restate import path * Update SOLD2_detector docstring * Add LineMatcherCfg dataclass to structures.py * Update LineMatcherCfg to include line_score * refactor: cfg of SOLD2 and WunschLineMatcher to be dataclasses * my bad... * fix: update WunschLineMatcher initialization * fix: update SOLD2 initialiation * fix: rollback due to inconsistencies with sold2 config to dataclass * chore: remove repetitive words (#2902) * chore: remove repetitive words * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * CI: Drop macos-latest runner for torch 1.9.1 (#2905) * fix (CI): remove old torch on macos * chore: ensure last pytorch * [pre-commit.ci] pre-commit suggestions (#2894) * [pre-commit.ci] pre-commit suggestions updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.1 → v0.4.2](astral-sh/ruff-pre-commit@v0.4.1...v0.4.2) * fix up031 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: João Gustavo A. Amorim <[email protected]> * feat: in_range filtering (#2895) * initial commit * add docs * add tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update docs * correct typing * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update tests and docs * change randn to rand * Modify docs indentation * correct docs and remove unused vars * add return_mask * Remove shape in doc * fix docs format --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: edgar <[email protected]> --------- Co-authored-by: peicuiping <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: João Gustavo A. Amorim <[email protected]> Co-authored-by: Vicent Gilabert <[email protected]> Co-authored-by: edgar <[email protected]>
* initial commit * add docs * add tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update docs * correct typing * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update tests and docs * change randn to rand * Modify docs indentation * correct docs and remove unused vars * add return_mask * Remove shape in doc * fix docs format --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: edgar <[email protected]>
* refactor: store sold2_detector config dataclasses in utils/structures.py * fix: update path to DetectorCfg in Docstring * Move structures.py and restate import path * Update SOLD2_detector docstring * Add LineMatcherCfg dataclass to structures.py * Update LineMatcherCfg to include line_score * refactor: cfg of SOLD2 and WunschLineMatcher to be dataclasses * my bad... * fix: update WunschLineMatcher initialization * fix: update SOLD2 initialiation * fix: rollback due to inconsistencies with sold2 config to dataclass * chore: remove repetitive words (kornia#2902) * chore: remove repetitive words * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * CI: Drop macos-latest runner for torch 1.9.1 (kornia#2905) * fix (CI): remove old torch on macos * chore: ensure last pytorch * [pre-commit.ci] pre-commit suggestions (kornia#2894) * [pre-commit.ci] pre-commit suggestions updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.1 → v0.4.2](astral-sh/ruff-pre-commit@v0.4.1...v0.4.2) * fix up031 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: João Gustavo A. Amorim <[email protected]> * feat: in_range filtering (kornia#2895) * initial commit * add docs * add tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update docs * correct typing * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update tests and docs * change randn to rand * Modify docs indentation * correct docs and remove unused vars * add return_mask * Remove shape in doc * fix docs format --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: edgar <[email protected]> --------- Co-authored-by: peicuiping <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: João Gustavo A. Amorim <[email protected]> Co-authored-by: Vicent Gilabert <[email protected]> Co-authored-by: edgar <[email protected]>
Changes
Following cv2.inRange OpenCV function, I've implemented a pytorch version for batched images.
The function needs the image, and two bounds for filtering (lower and upper).
There is the possibility to add a parameter (return_mask) to return the mask and otherwise the filtered image.
Code to get image:
Type of change
Checklist