Skip to content
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

XFeat parser for Mono and Stereo. #82

Merged
merged 1 commit into from
Sep 30, 2024
Merged

XFeat parser for Mono and Stereo. #82

merged 1 commit into from
Sep 30, 2024

Conversation

kkeroo
Copy link
Collaborator

@kkeroo kkeroo commented Sep 27, 2024

This PR changes the way XFeat output is parsed. Currently, we match two consecutive frames from the same input source - not really useful. Now, we introduce two parsers for XFeat - Mono and Stereo versions. Mono version works with one input source (e.g. one color camera) and lets you set the reference frame by triggering with setTrigger() method and then all future frames are matched to the reference frame. Stereo version works with two input sources (e.g. left and right camera) and always matches the "left" frame with the "right" frame.

Additionally, postprocessing is improved - it is faster and uses only bilinear interpolation. Original implementation uses bilinear, bicubic and nearest. This does not affect the final results very much.

This PR is also not relevant to the Parsers V2.

@github-actions github-actions bot added enhancement New feature or request parsers Changes affecting ml.parsers labels Sep 27, 2024
Copy link

Test Results

143 tests   143 ✅  1s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit ad94f56.

Copy link

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2446 970 40% 0% 🟢

New Files

File Coverage Status
depthai_nodes/ml/parsers/xfeat_stereo.py 16% 🟢
TOTAL 16% 🟢

Modified Files

File Coverage Status
depthai_nodes/ml/parsers/init.py 100% 🟢
depthai_nodes/ml/parsers/utils/xfeat.py 8% 🟢
TOTAL 54% 🟢

updated for commit: ad94f56 by action🐍

Copy link
Collaborator

@jkbmrz jkbmrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kkeroo kkeroo merged commit de544a4 into dev Sep 30, 2024
11 checks passed
klemen1999 added a commit that referenced this pull request Oct 7, 2024
* Added labeler to CI (#43)

* Updated requirements.txt (#44)

* Added coverage badge to README (#45)

* Added package version (#46)

* Update ci.yaml

* [Automated] Updated coverage badge

* Update README.md

* YOLOv8 kpts and seg example. (#48)

* Extend MPPalmDetection parser. (#49)

* Add support for different input sizes.

* Support extended palm detection in examples.

* Pre-commit fix.

* Add normalization.

* feat: add support for metric depth

* fix: broken depth tests

* fix: pre-commit

* fix: change default depth limit to float

* feat: add test for metric depth map

* Developer guide docs added. (#51)

* Support for metrics depth type. (#52)

* Hotfix: remove no-commit from pre-commit (#54)

* Added automatic PyPI publishing (#55)

* feat: add parser for DM-Count crowd density estimation model

* fix: pre-commit

* fix: add missing imports

* feat: add property methods to Map2D message

* fix: density map dimensions

* fix: pre-commit

* feat: unify map parsers

* feat: unify map message creators

* refactor: simplify map message file name

* feat: add map tests

* fix: pre-commit

* fix: map tests

* fix: map scaling test

* fix: pre-commit

* [Automated] Updated coverage badge

* feat: remove thermal image parser and creator

* feat: remove thermal image tests

* fix: remove imports of the deleted objects

* [Automated] Updated coverage badge

* fix: create_map_message output type hint

* fix: pre-commit

* Adds FastSAM to example. (#58)

* Extend Segmentation Parser. (#59)

* Extend input shapes options.

* Small fix.

* Added PaddlePaddle Text detection model parser.

* Added Parser to __init__

* Fixes Shape Error bug

* pre-commit error

* [fix] precommit

* [Automated] Updated coverage badge

* Revision.

* Remove syntax error

Co-authored-by: KlemenSkrlj <47853619+klemen1999@users.noreply.github.com>

* Update depthai_nodes/ml/parsers/utils/ppocr.py

* Renamed some functions.

* Removed wrong  __init__ imports

* PaddleOCR model returns a sequence of classification probabilities for characters.

This PR adds a classification_sequence_message that returns a sequence of charecters corresponding to maximum probability in the sequence.
The message has optional parameters to remove duplicates and ignore background class indexes.

In addition this PR also adds a PaddleOCR Parser, which utilizes the classification_sequence message.

* [Automated] Updated coverage badge

* Lane detection parser. (#61)

* Add LaneDetectionParser.

* Add tests.

* Add LaneDetection parser to parsers.

* Example added.

* typo.

* Precommit fix.

* [Automated] Updated coverage badge

---------

Co-authored-by: GitHub Actions <actions@github.com>

* [Automated] Updated coverage badge

* PaddleOCR Parser and Classification Sequence message

* Added unit tests and modified some assertions

* pre-commit fixs

* Doc string fix

* [Automated] Updated coverage badge

* small fix

* [BUG] small bug fix where x_min was not <= x_max

* Added VehicleAttribte Parser and tests.

* Added docstrings.

* [Automated] Updated coverage badge

* Changed to MultiClassification parser

* [Automated] Updated coverage badge

* Updated docstrings and names

* fixed unit-test name

* Updated variable names.

* Refactor code.

* remove AgeGender Message.

* Refactor examples.

* refactor: separate visualizers and their utils

* refactor: remove mapping.py

* feat: add support for models with 2D map output

* fix: add FPS limit to avoid OAK-D Lite errors

* docs: update README.md

* fix: pre-commit

* [HOT-FIX] Update ppdet to return polygons.

* [Automated] Updated coverage badge

* Update depthai_nodes/ml/parsers/ppdet.py

Co-authored-by: KlemenSkrlj <47853619+klemen1999@users.noreply.github.com>

* dele one line

* Better error in MPPalmDetectionParser. (#72)

* Fix RVC4 order (#76)

* XFeat parser for Mono and Stereo. (#82)

* Tiling and TilesPatcher (#89)

* Release depthai-nodes v0.0.1 (#53)

* Added labeler to CI (#43)

* Updated requirements.txt (#44)

* Added coverage badge to README (#45)

* Added package version (#46)

* Update ci.yaml

* [Automated] Updated coverage badge

* Update README.md

* YOLOv8 kpts and seg example. (#48)

* Extend MPPalmDetection parser. (#49)

* Add support for different input sizes.

* Support extended palm detection in examples.

* Pre-commit fix.

* Add normalization.

* feat: add support for metric depth

* fix: broken depth tests

* fix: pre-commit

* fix: change default depth limit to float

* feat: add test for metric depth map

* Developer guide docs added. (#51)

* Support for metrics depth type. (#52)

* Hotfix: remove no-commit from pre-commit (#54)

* Added automatic PyPI publishing (#55)

---------

Co-authored-by: Martin Kozlovský <kozlovsky.m7@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Jaša Kerec <61207502+kkeroo@users.noreply.github.com>
Co-authored-by: jkbmrz <jakob.mraz@gmail.com>
Co-authored-by: jkbmrz <74824974+jkbmrz@users.noreply.github.com>

* initial commit with two nodes - Tiling and TilesPatcher | TilesPatcher implemented to work with dai.ImgDetections

* running pre-commit

* refactored locations of nodes into helpers + docstring added

---------

Co-authored-by: KlemenSkrlj <47853619+klemen1999@users.noreply.github.com>
Co-authored-by: Martin Kozlovský <kozlovsky.m7@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Jaša Kerec <61207502+kkeroo@users.noreply.github.com>
Co-authored-by: jkbmrz <jakob.mraz@gmail.com>
Co-authored-by: jkbmrz <74824974+jkbmrz@users.noreply.github.com>

* reformatted docstring in epytext (#92)

* reformatted docstring in epytext

* [Automated] Updated coverage badge

---------

Co-authored-by: GitHub Actions <actions@github.com>

* Minor release preparation. (#93)

* Bigger tolerance for classification scores.

* Improved MultiClassificationParser.

* Warnings in Keypoints and Segmentation parsers.

* Examples for new models.

* Adjusted tests due to tolerance change.

* Add XFeat Mono and Stereo to examples.

* XFeat demo instructions.

* Remove warp drawing in stereo mode.

* Version bump. (#97)

* Release: Fix merge conflicts (#99)

---------

Co-authored-by: Martin Kozlovský <kozlovsky.m7@gmail.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Jaša Kerec <61207502+kkeroo@users.noreply.github.com>
Co-authored-by: jkbmrz <jakob.mraz@gmail.com>
Co-authored-by: jkbmrz <74824974+jkbmrz@users.noreply.github.com>
Co-authored-by: aljazkonec1 <konec.aljaz1@gmail.com>
Co-authored-by: aljazkonec1 <53098513+aljazkonec1@users.noreply.github.com>
Co-authored-by: Jan Čuhel <79118988+HonzaCuhel@users.noreply.github.com>
Co-authored-by: Han Bui <74987252+spbui00@users.noreply.github.com>
@kkeroo kkeroo deleted the parsers/xfeat branch October 17, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parsers Changes affecting ml.parsers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants