-
Notifications
You must be signed in to change notification settings - Fork 0
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
Restructure; Add Parsers, Util Functions and Message Creators #4
Conversation
ml/postprocessing/yunet.py
Outdated
|
||
class YuNetParser(dai.node.ThreadedHostNode): | ||
def __init__( | ||
self, | ||
score_threshold=0.6, | ||
nms_threshold=0.3, | ||
top_k=5000, | ||
input_size=(640, 640), # WH | ||
input_size=(640, 640), # WH |
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.
Is this required? We seem to use it for cols and rows calculation, which we can simply get from the output shape of the tensor itself.
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.
I will test utils functions.
Yea, probably we can delete |
…de_detections util function
In 17ce753, I've merged the old depth message to monocular_depth message and deleted it. @kkeroo, can you check and confirm this is OK? EDIT: It's now called depth message. |
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.
The new depth message looks good. I tested new util functions and they work.
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.
Please address the one comment, then merge and we can update #5 to use this.
Adding the following utils functions:
decode_detections
: Decode the detections from neural network output tensors,unnormalize_image
: Un-normalize an image tensor by scaling it to the [0, 255] range,create_detections_msg
: Create a depthai message for an image array,create_image_msg
: Create a depthai message for an image array,create_monocular_depth_msg
: Creates a depth message in the form of an ImgFrame using the provided depth map and depth type,and adjusting the existing postprocessing nodes to these changes.
@kkeroo, some things to consider:
create_monocular_depth_msg
despite you already have implemented something similar increate_depth_segmentation_msg
. However, I think its better we keep the two tasks (segmentation and depth estimation) separated. EDIT: I see this was changed in the meantime and segmentation and depth are already separated. Will check how I can merge my code@tersekmatija, could you please check the
create_monocular_depth_msg
function to confirm it's implemented as expected?