zerollzeng / tensorrt-zoo

openpose, yolov3 with tiny-tensorrt
86 stars 25 forks source link

cannot detect some picture as raw openpose #26

Closed lwcode closed 4 years ago

lwcode commented 4 years ago

The option is: --run_mode 0 --height 320 --width 480 --batchsize 1 raw openpose: image

tensorrt: image

How about it?

zerollzeng commented 4 years ago

need more information, make sure your prototxt and code's width and height are compatible

lwcode commented 4 years ago

this is the prototxt file head:

name: "OpenPose - BODY_25"
input: "image"
input_dim: 1 # This value will be defined at runtime
input_dim: 3
input_dim: 320 # modify this for run sample
input_dim: 480 # modify this for run sample

and the openpose raw model is pose_iter_584000.caffemodel,

zerollzeng commented 4 years ago

did you try it with 480 and 640 as my default config? does it run correctly?

lwcode commented 4 years ago

your default config result is: 633

seem incorrectly

zerollzeng commented 4 years ago

I think there should be some problem with your code, try re-clone the latest and then compile and run it as the readme, see can you get the right output with test.jpg. by the way can you post your running envioronment?

lwcode commented 4 years ago

The code for test.jpg work well, I can get the correct result, and most of my images can get the right results as raw openpose, but some images like previously discussed, not good as raw openpose. my platform is: Win10, 1080ti@E5-2620 v4, cuda10.0&tensorrt7.0.0.11:

.\bin\Release\testopenpose.exe --prototxt ./models/pose/body_25/pose_deploy.prototxt --caffemodel ./models/pose/body_25/pose_iter_584000.caffemodel --save_engine ./engines/body_25 --run_mode 0  --input my.jpg
[2020-07-06 15:48:35.279] [info] create plugin factory
[2020-07-06 15:48:35.279] [info] yolo3 params: class: 1, netSize: 416
[2020-07-06 15:48:35.279] [info] upsample params: scale: 2.0
[2020-07-06 15:48:35.280] [info] prototxt: ./models/pose/body_25/pose_deploy.prototxt
[2020-07-06 15:48:35.280] [info] caffeModel: ./models/pose/body_25/pose_iter_584000.caffemodel
[2020-07-06 15:48:35.280] [info] engineFile: ./engines/body_25
[2020-07-06 15:48:35.280] [info] outputBlobName:
net_output
[2020-07-06 15:48:35.281] [info] deserialize engine from ./engines/body_25
[2020-07-06 15:48:41.271] [info] max batch size of deserialized engine: 1
[2020-07-06 15:48:41.319] [info] create execute context and malloc device memory...
[2020-07-06 15:48:41.319] [info] init engine...
Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles
[2020-07-06 15:48:41.344] [info] malloc device memory
nbBingdings: 2
[2020-07-06 15:48:41.344] [info] input:
[2020-07-06 15:48:41.344] [info] binding bindIndex: 0, name: image, size in byte: 3686400
[2020-07-06 15:48:41.344] [info] binding dims with 3 dimemsion
3 x 480 x 640
[2020-07-06 15:48:41.346] [info] output:
[2020-07-06 15:48:41.346] [info] binding bindIndex: 1, name: net_output, size in byte: 1497600
[2020-07-06 15:48:41.346] [info] binding dims with 3 dimemsion
78 x 60 x 80
=====>malloc extra memory for openpose...
heatmap Dims: 3
heatmap size: 1 78 60 80
allocate heatmap host and divice memory done
resize map size: 1 78 60 80
kernel size: 1 78 60 80
allocate kernel host and device memory done
peaks size: 1 25 128 3
allocate peaks host and device memory done
=====> malloc extra memory done
zerollzeng commented 4 years ago

them I don't think it's a bug, the post processing phase maybe the reason, you may dig into it but sorry I can't help you with this since it's been a long time :sweat_smile: .

lwcode commented 4 years ago

Thanks for your help, I am checking the post processing part right now, hope to solve it.