I tried to evaluate the trainable model directly using the Jupyter notebook for detectnet_v2. I used the command:
!tao detectnet_v2 inference -e $SPECS_DIR/my_inference.txt \
-o $USER_EXPERIMENT_DIR/my_data_testing \
-i $USER_EXPERIMENT_DIR/my_data \
-k $KEY
The folder my_data
contains my testing photos. The variables are set in the section 0 in the Jupyter notebook. I ran whole this Jupyter notebook before and all seems to work there. The file my_inference.txt
contains:
inferencer_config{
# defining target class names for the experiment.
# Note: This must be mentioned in order of the networks classes.
target_classes: "person"
target_classes: "bag"
target_classes: "face"
# Inference dimensions.
image_width: 960
image_height: 544
# Must match what the model was trained for.
image_channels: 3
batch_size: 1
gpu_index: 0
# model handler config
tlt_config{
model: "/workspace/tao-experiments/detectnet_v2/resnet34_peoplenet.tlt"
}
}
bbox_handler_config{
kitti_dump: true
disable_overlay: false
overlay_linewidth: 2
classwise_bbox_handler_config{
key:"person"
value: {
confidence_model: "aggregate_cov"
output_map: "person"
bbox_color{
R: 0
G: 255
B: 0
}
clustering_config{
clustering_algorithm: DBSCAN
coverage_threshold: 0.005
dbscan_eps: 0.3
dbscan_min_samples: 0.05
dbscan_confidence_threshold: 0.9
minimum_bounding_box_height: 4
}
}
}
classwise_bbox_handler_config{
key:"bag"
value: {
confidence_model: "aggregate_cov"
output_map: "bag"
bbox_color{
R: 0
G: 255
B: 255
}
clustering_config{
clustering_algorithm: DBSCAN
coverage_threshold: 0.005
dbscan_eps: 0.3
dbscan_min_samples: 0.05
dbscan_confidence_threshold: 0.9
minimum_bounding_box_height: 4
}
}
}
classwise_bbox_handler_config{
key:"face"
value: {
confidence_model: "aggregate_cov"
output_map: "face"
bbox_color{
R: 255
G: 0
B: 0
}
clustering_config{
clustering_algorithm: DBSCAN
coverage_threshold: 0.005
dbscan_eps: 0.3
dbscan_min_samples: 0.05
dbscan_confidence_threshold: 0.9
minimum_bounding_box_height: 4
}
}
}
classwise_bbox_handler_config{
key:"default"
value: {
confidence_model: "aggregate_cov"
bbox_color{
R: 255
G: 0
B: 0
}
clustering_config{
clustering_algorithm: DBSCAN
dbscan_confidence_threshold: 0.9
coverage_threshold: 0.005
dbscan_eps: 0.3
dbscan_min_samples: 0.05
minimum_bounding_box_height: 4
}
}
}
}
When I use this, all pictures are evaluated. Persons and faces are detected but no bags.
There are three thresholds.
coverage_threshold
, dbscan_min_samples
and dbscan_confidence_threshold
. If I set them all to 0, there are many detections. However, if I set any of those thresholds to 0.00000001, there are no bag detections at all. Persons and faces are detected normally.
I test it on 8 photos with 11 bags in total. None of them is detected, not even a single false-positive.
EDIT: I set the resolution to 940×544, still the same result