when I using the tensorRT FasterRCNN sample
with the image offered by github in dusty-nv/jetson-inference
ex: jetson-inference/dog_2.jpg at master · dusty-nv/jetson-inference · GitHub
and other images, there are no detection results even though I lower the threshold
“nms_threshold” and “score_threshold”. I have revised the code to load .jpg and
it works when loading images in sample faster-rcnn folder transformed to .jpg from .ppm
In FasterRCNN sample, we extract image data via function ‘readPPMFile’.
readPPMFile is a simple parser for the uncompressed image format. It can’t read a .jpg file, and the output will be incorrect.
For jpg decoder, you can check this sample.
And another question,
can we adjust OutputDimension in stage enqueue?
like in caffe, we can reshape top blob in stage Forward_cpu after LayerSetup.
Am I right to seem getOutputDimensions() and initialize() as LayerSetup in caffe
and enqueue as Forward_cpu in caffe?
When creating the TensorRT engine, the output dimension is chosen for optimized performance.
TensorRT doesn’t support the dimension change on the fly. Sorry for the inconvenience.
I load trained model but it break:
[libprotobuf FATAL …/…/…/externals/protobuf/aarch64/10.0/include/google/protobuf/repeated_field.h:1078] CHECK failed: (index) < (current_size_):
terminate called after throwing an instance of ‘google_private::protobuf::FatalException’
what(): CHECK failed: (index) < (current_size_)
I have refered https://devtalk.nvidia.com/default/topic/1004468/how-to-start-tensorrt-on-tx1-/
but it still doesn’t work.
what kind of problem may it happened?
Which Caffe version do you use for training?
Please remember that TensorRT2.1 only support nvcaffe-0.15 branch.
NvCaffe-0.16 may lead to error.
I train by using BVLC/caffe(version:1.0.0-rc3) instead of using DIGITS.
Does it affect?
Should I retrain my model by nvcaffe-0.15 instead?
Do you use TensorRT1.0?
Could you try to use TensorRT2.1 with JetPack3.1?
Could you share prototxt and caffemodel?
in protofile, and it works, why it works after revised?
(note: it breaks in “Begin parsing model…” before revised)
They have different meaning:
dim: 1 ← BATCHSIZE
dim: 1 ← channel
dim: 1 ← height
dim: 3 ← widith
Please check this tutorial for more information:
I face another problem
Begin building engine…
res5a: all elementwise inputs must have same dimensions
res5b: all elementwise inputs must have same dimensions
res5c: all elementwise inputs must have same dimensions
I remember tensorRT2 support elementwise, but why this message appear?
From the error message, your elementwise has different dimensions.
Elementwise need two identical dimension input. Could you recheck it?
Ok, I will recheck it thx!
When implement getOutputDimensions(int index, const Dims* inputs, int nbInputDims)
what is nbInputDims exactly?
and inputs.d,inputs.d,inputs.d,inputs.d are always (N,C,H,W)?
If not, how to get N of (N,C,H,W)?
I have the same problem.
And this is due to the data shape defined in prototxt.
the dim has to fit the height and width of the input image.
in the original faster rcnn, I can pass any resolution by reshape input layer before forwarding.
Can I reshape the input shape in TensorRT?
It looks like this issue is from your model design.
You can check it via DIGITs or other visualized frameworks.
Dimension of C, H, W can get by getOutputDimensions(…)
[url]Face-Recognition/pluginImplement.cpp at master · AastaNV/Face-Recognition · GitHub
getNbOutputs() is return the number of output blobs, rather than the dimension.
so if in getOutputDimensions, we just return DimsNCHW
and in its next layer, we can get
inputs.d, inputs.d, inputs.d, inputs.d for (N,C,H,W) right?
and DimsHW in its next layer, we can get
inputs.d, inputs.d for (H,W) right?
Only C, H, W information is available.
In plugin API, user doesn’t need to take care of BatchSize handling.
The operation will be applied to all the batch data automatically.
so in such reshape param
we just return DimsCHW(300,5,1) or DimsCHW(1,300,5)??