Peoplenet unpruned model evaluation

Hi all,
I am trying to evaluate peoplenet unpruned model ( resnet34_peoplenet.tlt) on my evaluation dataset but it is showing dimension error(cannot reshape a tensor) but i am able to train peoplenet unpruned model on my custom dataset and i am able to evaluate also.
For more info: I am attaching my training specification file also.peoplenet_train_resnet34_kitti (1).txt (3.2 KB)
Please help me to fix this.Thanks:)

Could you please post the full error log?

Please double check your evaluation dataset are resized to 960x544.
Reference topics:


Hi @Morganh.
yes, my evaluation dataset resized to 960*544.
Please find the below logs:
Using TensorFlow backend.
2020-07-01 06:06:23,381 [INFO] iva.detectnet_v2.spec_handler.spec_loader: Merging specification from /workspace/examples/detectnet_v2/specs/peoplenet_evaluation_resnet34_kitti.txt
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
target/truncation is not updated to match the crop areaif the dataset contains target/truncation.
2020-07-01 06:06:34,417 [INFO] /usr/local/lib/python2.7/dist-packages/iva/detectnet_v2/evaluation/build_evaluator.pyc: Found 596 samples in validation set
Traceback (most recent call last):
File “/usr/local/bin/tlt-evaluate”, line 8, in
sys.exit(main())
File “./common/magnet_evaluate.py”, line 48, in main
File “”, line 2, in main
File “./detectnet_v2/utilities/timer.py”, line 46, in wrapped_fn
File “./detectnet_v2/scripts/evaluate.py”, line 119, in main
File “./detectnet_v2/evaluation/build_evaluator.py”, line 124, in build_evaluator_for_trained_gridbox
File “./detectnet_v2/model/utilities.py”, line 30, in _fn_wrapper
File “./detectnet_v2/model/detectnet_model.py”, line 652, in build_validation_graph
File “./detectnet_v2/model/utilities.py”, line 30, in _fn_wrapper
File “./detectnet_v2/model/detectnet_model.py”, line 617, in build_inference_graph
File “./detectnet_v2/model/detectnet_model.py”, line 261, in predictions_to_dict
File “./detectnet_v2/objectives/base_objective.py”, line 97, in reshape_output
File “/usr/local/lib/python2.7/dist-packages/keras/engine/base_layer.py”, line 457, in call
output = self.call(inputs, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/keras/layers/core.py”, line 401, in call
return K.reshape(inputs, (K.shape(inputs)[0],) + self.target_shape)
File “/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py”, line 1969, in reshape
return tf.reshape(x, shape)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py”, line 7179, in reshape
“Reshape”, tensor=tensor, shape=shape, name=name)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py”, line 788, in _apply_op_helper
op_def=op_def)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py”, line 507, in new_func
return func(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py”, line 3300, in create_op
op_def=op_def)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py”, line 1823, in init
control_input_ops)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py”, line 1662, in _create_c_op
raise ValueError(str(e))
ValueError: Cannot reshape a tensor with 391680 elements to shape [16,1,4,34,60] (130560 elements) for ‘reshape_1_1/Reshape’ (op: ‘Reshape’) with input shapes: [16,12,34,60], [5] and with input tensors computed as partial shapes: input[1] = [16,1,4,34,60].

Hi @Morganh
I am able to fix the error. Actually the unpruned model which is given on the website is trained for three classes but in my specification file i am giving only one class that’s why this reshape error is coming.
I trained model with my custom dataset only for one class and i am giving same specification file for the model which is given on the website which is not good. That’s why reshape error is coming.
Thanks for your support:)

OK, thanks for the info. Nice job~

But one thing I want to discuss, I evalaute my retrained model it is giving 75.484% mAP for person class and i evaluate unpruned model which is given on the website on the same dataset it is giving 74% mAp for person class. But when i am doing inferencing, model which is given on the website is doing good prediction with high confidence while my retrained model is doing inferencing with very less confidence. Any suggestions why this is happening?

I am afriad it results from different training dataset.