-
Notifications
You must be signed in to change notification settings - Fork 675
Add YOLOv5 support for RV1126 device. #1321
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
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5f54bc6
support pose simcc
AllentDan 0903731
fix yolov5 create_input
AllentDan d03ff70
add yolov5 post process and update mmcls.yml
AllentDan 2be0196
add letter resize
AllentDan aac6c34
add yolov5 export info
AllentDan a5d2929
fix
AllentDan ae51967
add pose face config
AllentDan 949afa0
Merge branch 'dev-1.x' into rv1126-yolov5
AllentDan fda8f65
Merge branch 'dev-1.x' into rv1126-yolov5
AllentDan c54798b
pick 4dd4d4851bcc381da3e44098a2ff3d1ff6b5f1d9
AllentDan 10578e8
fix yolov5 head
AllentDan 69e05e3
Merge branch 'dev-1.x' into rv1126-yolov5
AllentDan 726a723
fix ut
AllentDan 77738dc
refactor mmpose config
AllentDan 65b6f4c
pass output_names outside
AllentDan 4f9d2ae
rknn batch size
AllentDan e9a5e8d
lint
AllentDan aae08af
add input names to wrapper
AllentDan 93c57b7
update according to https://github.com/open-mmlab/mmyolo/pull/305
AllentDan 573272e
add pre_compile option
AllentDan bd06b8a
update doc and fix typo
AllentDan 06c04c4
fix padding
AllentDan 4e1393b
Merge branch 'dev-1.x' into rv1126-yolov5
AllentDan 0ec3aa9
fix typo
AllentDan 70d1539
use throw_exception
AllentDan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
backend_config = dict( | ||
type='rknn', | ||
common_config=dict( | ||
mean_values=None, # [[103.53, 116.28, 123.675]], | ||
std_values=None, # [[57.375, 57.12, 58.395]], | ||
target_platform='rv1126', # 'rk3588' | ||
optimization_level=1), | ||
quantization_config=dict(do_quantization=False, dataset=None)) | ||
quantization_config=dict( | ||
do_quantization=True, | ||
dataset=None, | ||
pre_compile=False, | ||
rknn_batch_size=-1)) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
_base_ = ['./classification_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[224, 224]) | ||
codebase_config = dict(model_type='end2end') | ||
backend_config = dict( | ||
input_size_list=[[3, 224, 224]], | ||
quantization_config=dict(do_quantization=False)) |
2 changes: 1 addition & 1 deletion
2
...cls/classification_rknn_static-224x224.py → ...lassification_rknn-int8_static-224x224.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
_base_ = ['./classification_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[224, 224]) | ||
codebase_config = dict(model_type='rknn') | ||
codebase_config = dict(model_type='end2end') | ||
backend_config = dict(input_size_list=[[3, 224, 224]]) |
34 changes: 34 additions & 0 deletions
34
configs/mmdet/detection/detection_rknn-fp16_static-320x320.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
_base_ = ['../_base_/base_static.py', '../../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[320, 320]) | ||
|
||
codebase_config = dict(model_type='rknn') | ||
|
||
backend_config = dict( | ||
input_size_list=[[3, 320, 320]], | ||
quantization_config=dict(do_quantization=False)) | ||
|
||
# # yolov3, yolox for rknn-toolkit and rknn-toolkit2 | ||
# partition_config = dict( | ||
# type='rknn', # the partition policy name | ||
# apply_marks=True, # should always be set to True | ||
# partition_cfg=[ | ||
# dict( | ||
# save_file='model.onnx', # name to save the partitioned onnx | ||
# start=['detector_forward:input'], # [mark_name:input, ...] | ||
# end=['yolo_head:input'], # [mark_name:output, ...] | ||
# output_names=[f'pred_maps.{i}' for i in range(3)]) # out names | ||
# ]) | ||
|
||
# # retinanet, ssd, fsaf for rknn-toolkit2 | ||
# partition_config = dict( | ||
# type='rknn', # the partition policy name | ||
# apply_marks=True, | ||
# partition_cfg=[ | ||
# dict( | ||
# save_file='model.onnx', | ||
# start='detector_forward:input', | ||
# end=['BaseDenseHead:output'], | ||
# output_names=[f'BaseDenseHead.cls.{i}' for i in range(5)] + | ||
# [f'BaseDenseHead.loc.{i}' for i in range(5)]) | ||
# ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
_base_ = ['./pose-detection_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[192, 256]) | ||
|
||
codebase_config = dict(model_type='end2end') | ||
|
||
backend_config = dict( | ||
input_size_list=[[3, 256, 192]], | ||
quantization_config=dict(do_quantization=False), | ||
common_config=dict(target_platform='rv1126')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
_base_ = ['./pose-detection_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[256, 256]) | ||
|
||
codebase_config = dict(model_type='end2end') | ||
|
||
backend_config = dict( | ||
input_size_list=[[3, 256, 256]], | ||
quantization_config=dict(do_quantization=False), | ||
common_config=dict(target_platform='rv1126')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
_base_ = ['./pose-detection_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[192, 256]) | ||
|
||
codebase_config = dict(model_type='end2end') | ||
|
||
backend_config = dict( | ||
input_size_list=[[3, 256, 192]], | ||
common_config=dict(target_platform='rv1126')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
_base_ = ['./pose-detection_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[256, 256]) | ||
|
||
codebase_config = dict(model_type='end2end') | ||
|
||
backend_config = dict( | ||
input_size_list=[[3, 256, 256]], | ||
common_config=dict(target_platform='rv1126')) |
7 changes: 7 additions & 0 deletions
7
configs/mmpose/pose-detection_simcc_rknn-fp16_static-256x192.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
_base_ = ['./pose-detection_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[192, 256], output_names=['simcc_x', 'simcc_y']) | ||
|
||
backend_config = dict( | ||
input_size_list=[[3, 256, 192]], | ||
quantization_config=dict(do_quantization=False)) |
5 changes: 5 additions & 0 deletions
5
configs/mmpose/pose-detection_simcc_rknn-int8_static-256x192.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
_base_ = ['./pose-detection_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[192, 256], output_names=['simcc_x', 'simcc_y']) | ||
|
||
backend_config = dict(input_size_list=[[3, 256, 192]]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
_base_ = ['./segmentation_static.py', '../_base_/backends/rknn.py'] | ||
|
||
onnx_config = dict(input_shape=[320, 320]) | ||
|
||
codebase_config = dict(model_type='rknn') | ||
|
||
backend_config = dict( | ||
input_size_list=[[3, 320, 320]], | ||
quantization_config=dict(do_quantization=False)) |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.