Skip to content

Commit

Permalink
Minor release preparation. (#93)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
kkeroo authored and klemen1999 committed Oct 24, 2024
1 parent 327b7e3 commit fd6585f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions examples/utils/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,30 @@ def setup_fastsam_parser(parser: FastSAMParser, params: dict):
)


def setup_paddleocr_parser(parser: PaddleOCRParser, params: dict):
"""Setup the PaddleOCR parser with the required metadata."""
try:
classes = params["classes"]
parser.setClasses(classes)
except Exception:
print(
"This NN archive does not have required metadata for PaddleOCRParser. Skipping setup..."
)


def setup_multi_classification_parser(parser: MultiClassificationParser, params: dict):
"""Setup the Multi Classification parser with the required metadata."""
try:
classification_attributes = params["classification_attributes"]
classification_labels = params["classification_labels"]
parser.setClassificationAttributes(classification_attributes)
parser.setClassificationLabels(classification_labels)
except Exception:
print(
"This NN archive does not have required metadata for MultiClassificationParser. Skipping setup..."
)


def setup_parser(parser: dai.ThreadedNode, nn_archive: dai.NNArchive, parser_name: str):
"""Setup the parser with the NN archive."""

Expand Down

0 comments on commit fd6585f

Please sign in to comment.