linghu8812 / tensorrt_inference

696 stars 205 forks source link

anchor define #161

Open alicera opened 1 year ago

alicera commented 1 year ago

yolov7 I cant find the yolov7 anchor How do you compute the anchor?

https://github.com/WongKinYiu/yolov7/blob/main/cfg/training/yolov7.yaml

linghu8812 commented 1 year ago

yolov7 I cant find the yolov7 anchor How do you compute the anchor?

https://github.com/WongKinYiu/yolov7/blob/main/cfg/training/yolov7.yaml

it has been export in ONNX model and do not need to write in config files.

image

alicera commented 1 year ago

Could you tell me where is the possible place that anchor

I try to read the onnx

python export.py --weights ast.pt --simplify

Inputs:  ['images']
Outputs:  ['output', '516', '530'] 

input name images
input shape [1, 3, 640, 640]
input type tensor(float) 

output name: output
output shape: [1, 3, 80, 80, 85]
output type: tensor(float) 

output name: 516
output shape: [1, 3, 40, 40, 85]
output type: tensor(float) 

output name: 530
output shape: [1, 3, 20, 20, 85]
output type: tensor(float) 
linghu8812 commented 1 year ago

Could you tell me where is the possible place that anchor

I try to read the onnx

python export.py --weights ast.pt --simplify

Inputs:  ['images']
Outputs:  ['output', '516', '530'] 

input name images
input shape [1, 3, 640, 640]
input type tensor(float) 

output name: output
output shape: [1, 3, 80, 80, 85]
output type: tensor(float) 

output name: 516
output shape: [1, 3, 40, 40, 85]
output type: tensor(float) 

output name: 530
output shape: [1, 3, 20, 20, 85]
output type: tensor(float) 

view the output ONNX file with netron https://netron.app/