A few questions regarding detection tasks in TAO toolkit

I prepared a small set of images containing cigarettes as I intend to have some object detection models to detect them.

The numbers of training and validation images are 453 and 102, respectively.

Here are a few questions, however.

  1. I trained both YOLOv4-tiny and detectnet_v2 using the same dataset.
    I got a YOLOv4-tiny model reaching 88% mAP, but the one for detectnet_v2 got 0 or near 0 mAP.
    I trained YOLOv4-tiny using the spec file that doesn’t use tfrecord. (the one whose name ends with “seq”), while it seems that tf records are required for training detectnet_v2.

Anyway, I still prepared tf records for detectnet_v2 and I didn’t encounter any error messages, but the training result is just terrible. I wonder what could be the possible reasons.

Here’re the 2 spec files I used when trying to train a detectnet_v2 model.

detectnet_v2_tfrecords_kitti_trainval.txt (401 Bytes)
detectnet_v2_train_resnet18_kitti.txt (3.7 KB)

  1. There’re YOLOv4 and YOLOv4-tiny in TAO toolkit. I wonder if the differences between them are literally the spec files?

The default value of the backbone network for YOLOv4-tiny in its spec file is cspdarknet-tiny and there’re only big and middle anchor shapes.

I changed the backbone network to resnet18 and mobilenet_v1, set small anchor shapes for them and still successfully trained the network using the pretrained models of both backbone networks, respectively. Does this mean I was literally training “YOLOv4” instead of “YOLOv4-tiny” when the backbone network was no longer cspdarknet-tiny but other network containing more trainable parameters?

For “detectnet_v2 got 0 or near 0 mAP”, please set lower batch size and retry.
For 2nd item, yes, YOLOv4-tiny is using cspdarknet-tiny backbone. YOLOv4 is using other backbones.

1 Like