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

[decoder/bounding_box] Add decoder for yolov5 @open sesame 01/03 18:03 #3628

Merged
merged 2 commits into from
Jan 14, 2022

Conversation

anyj0527
Copy link
Member

@anyj0527 anyj0527 commented Jan 3, 2022

issue #3623
sample gst-launch pipelines:

  • for 640x640 model
$ gst-launch-1.0 \
v4l2src ! videoscale ! videoconvert ! video/x-raw,width=640,height=640,format=RGB,framerate=30/1,pixel-aspect-ratio=1/1 ! tee name=t \
  t. ! queue ! tensor_converter ! other/tensors,num_tensors=1,types=uint8,format=static,dimensions=3:640:640:1 ! \
    tensor_transform mode=arithmetic option=typecast:float32,add:0.0,div:255.0 ! queue leaky=2 max-size-buffers=2 ! \
    tensor_filter framework=tensorflow2-lite model=./yolov5s-fp16.tflite ! \
    other/tensors,num_tensors=1,types=float32,format=static,dimensions=85:25200:1:1 ! \
    tensor_decoder mode=bounding_boxes option1=yolov5 option2=./coco.txt option4=640:640 option5=640:640 ! \
    video/x-raw,width=640,height=640,format=RGBA ! mix.sink_0 \
  t. ! queue ! mix.sink_1 \
compositor name=mix sink_0::zorder=2 sink_1::zorder=1 ! videoconvert ! ximagesink
  • for 320x320 model
$ gst-launch-1.0 \
v4l2src ! videoscale ! videoconvert ! video/x-raw,width=320,height=320,format=RGB,framerate=30/1,pixel-aspect-ratio=1/1 ! tee name=t \
  t. ! queue ! tensor_converter ! other/tensors,num_tensors=1,types=uint8,format=static,dimensions=3:320:320:1 ! \
    tensor_transform mode=arithmetic option=typecast:float32,add:0.0,div:255.0 ! queue leaky=2 max-size-buffers=2 ! \
    tensor_filter framework=tensorflow2-lite model=./yolov5s-fp16-320.tflite ! \
    other/tensors,num_tensors=1,types=float32,format=static,dimensions=85:6300:1:1 ! \
    tensor_decoder mode=bounding_boxes option1=yolov5 option2=./coco.txt option4=320:320 option5=320:320 ! \
    video/x-raw,width=320,height=320,format=RGBA ! mix.sink_0 \
  t. ! queue ! mix.sink_1 \
compositor name=mix sink_0::zorder=2 sink_1::zorder=1 ! videoconvert ! ximagesink

REF: https://github.com/ultralytics/yolov5

Self evaluation:

  1. Build test: [X]Passed [ ]Failed [ ]Skipped
  2. Run test: [X]Passed [ ]Failed [ ]Skipped

- Fix some trivial typo issues

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
- Add feature for decoding yolov5 model's output
- Tested with tflite models from https://github.com/ultralytics/yolov5/releases/tag/v6.0

REF: https://github.com/ultralytics/yolov5
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
@taos-ci
Copy link
Collaborator

taos-ci commented Jan 3, 2022

📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #3628. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://nnstreamer.mooo.com/.

@anyj0527 anyj0527 changed the title [decoder/bounding_box] Add decoder for yolov5 [decoder/bounding_box] Add decoder for yolov5 @open sesame 01/03 18:03 Jan 3, 2022
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

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

@anyj0527, 💯 All CI checkers are successfully verified. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants