Can i only use the 'Person class' of the resnet10 model?

Hi i used resnet10 model of Primary_Detector_Nano directory.

I know that resnet10 has 4 Class (Car, Bicycle, Person, Roadsign)

and I want to change 4Class to 1Class (Only Person)

can i do this ?

Replying to subscribe to the thread. I am interested in this as well.

You can use the pgie config file parameter: filter-out-class-ids and provide it a semicolon separated list of classes you are not interested in, like so:

# only interested in persons (2)
filter-out-class-ids=0;1;3

Or… you can train your own model with TLT based off one of the pre-trained models on ngc.

Thank you @jasonpgf2a

I want to make a model with similar performance as resnet10.
But if i look at the various topics of the forum.
many people said that performance is lower than resnet10.

how about this? if the tlt model show better perfomance than resnet10. i’ll use the tlt retraining

filter-out-class-ids does not cater to your requirement?

Others have commented in the forums here that they have trained a detectnet with resnet10 backbone and got almost the exact same performance as deepstreams resnet10 caffe model. See this example: https://www.youtube.com/watch?v=NvqWFue6HGo&feature=youtu.be

I don’t know you use-case but you may also want to checkout the Peoplenet model.

Nonono filter-out-class-ids is very helpful for me

I just wanted to learn using TLT if there was a way.
and I will try to learn TLT by referring to the video.

+++

i added filter-out-class-ids in the config-infer-primary-nano.txt

[property]
gpu-id=0
net-scale-factor=0.0039215697906911373
model-file=../../models/Primary_Detector_Nano/resnet10.caffemodel
proto-file=../../models/Primary_Detector_Nano/resnet10.prototxt
model-engine-file=../../models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine
labelfile-path=../../models/Primary_Detector_Nano/labels.txt
batch-size=1
process-mode=1
model-color-format=0
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=2
num-detected-classes=4
**filter-out-class-ids=0;1;3** <<<<<<<<<<<<<<<<<<<<<<<
interval=0
gie-unique-id=1
output-blob-names=conv2d_bbox;conv2d_cov/Sigmoid
#parse-bbox-func-name=NvDsInferParseCustomResnet
#custom-lib-path=/path/to/libnvdsparsebbox.so
#enable-dbscan=1

but DS throw this error " Unknown key ‘filter-out-class-ids’ for group [property] "
Could you help me ??

are you asking how to re-train a model to change the detected class?

but, resnet10 is a caffe model instead of a model trained from TLT.

So, @jasonpgf2a’s suggestion is good for resnet10 to filter the class in post-processing.

Please provide your setup info as other topics provide so that we can provide more accurate answer for you.

hi @mchi

I am looking for a model with similar performance of resnet10 with only Person Class. (Must be 30fps on 720p Mjpg),
so i used peopleNet but it’s show only 10FPS On nano

I have to develop it based on DS4.0, but i think DS 4.0 no supported “filter-out-class-ids” property.

1.so I wonder if I can only use Person Class on Resnet10 on DS4.0 (or can use filter-out-class-ids property on DS4.0?)
2.or could i get a model that meets the above conditions?

Hi @jchcdev
I think you can modify ResNet10 parser code to filter out other classes.

./sources/libs/nvdsinfer_customparser/nvdsinfer_custombboxparser.cpp:CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE(NvDsInferParseCustomResnet);

Thanks!