Which detection model will give more accuracy for arial view image detection!

I have a dataset which contain both larger objects and very smaller objects . Faster_rcnn is used for training, i got good mAP value for larger objects but for smaller objects the accuracy is very very less…

Which detection model is good for both ? Or should i change any parameters in Faster_rcnn while training for smaller objects ?
faster_rcnn_train.txt (3.63 KB)

Hi samjith888,
For smaller objects of frcnn, Please refer to
https://devtalk.nvidia.com/default/topic/1065592/transfer-learning-toolkit/faster-rcnn-roi-issue/post/5398071/#5398071

Also, you can also try detectnet_v2 network. For small objects, you can

  • Lower minimum_detection_ground_truth_overlap (try to set to 0.5)
  • Lower minimum_height (try to set to 10)

My Training dataset have 3 objects which is very small and 2 objects which is very large. If i change the anchor size into smaller objects, is it affect the larger object detection?

Image resolution is 4096*2160, where the larger object will have 3/4 size of the image.

Hi sanjith888,
Could you please trigger experiment for that? To see if the mAP can be improved.

I have changed the anchor config in the train spec file for smaller objects, but still getting very lesser mAP value (0.083 for epoch number :25)

anchor_box_config {
scale: 8.0
scale: 16.0
scale: 32.0
ratio: 1.0
ratio: 0.5
ratio: 2.0
}

Should i change any parameters in my train spec file? please check the attached spec file

Hi samjith888,
Could you please paste the result of running tlt-evaluate? I want to check mAP and each class’ AP, etc.

================================================================================
Class AP precision recall

Helmet 0.0130 0.1969 0.0298

Missing_PPE 0.0000 0.0000 0.0000

Extra_PPE 0.0000 0.0000 0.0000

Sleeping_Person 0.0000 0.0000 0.0000

Suit 0.0581 0.3369 0.1070

mAP = 0.0142

Hi samjith888,
You mentioned that “got good mAP value for larger objects but for smaller objects the accuracy is very very less…”, but it conflicts with your tlt-evaluate result.

Can you give more details?

All the images in this datasets are smaller objects. The larger objects are in other datasets, where i got good mAP.

While training I’m getting No positive ROIs. for every epochs. I just referred the following link.

https://devtalk.nvidia.com/default/topic/1065592/transfer-learning-toolkit/faster-rcnn-roi-issue/

Hi samjith888,
You set 1024x544 in your training spec file.
size_height_width {
height: 544
width: 1024
}

So,I want to confirm that in your 1024x544 dataset, the objects are small, right?
Could you tell me the average size(height? width?) of the small objects?
I think you can simply check this via your dataset’s labels.

Thanks.

Image actual resolution is 4096*2160 where a object location is the following.

Helmet 0.00 0 0.00 316.26 713.94 403.70 767.30 0.00 0.00 0.00 0.00 0.00 0.00 0.00

So the average smaller object size will be 8754 in a 40962160 resolution image.

Hi samjith888,
Have you modified the bbox(x1,y1,x2,y2) in your label files? You have resized the images from 40962160 to 1024544.

Ignore my comment.

Do you know how to figure out this issue ?

Hi samjith888,
Please try more experiments.
1 Make sure the anchor box size is almost the same as the objects’ size. In your config file,
your anchors are as below. So they can cover the small objects(87/4, 54/4).
But I suggest you to check your small objects’ size further, to see if it is needed to trigger more experiments for different anchor ratio or scale.

array([[[ 8.      ,  8.      ],
        [ 5.656854, 11.313708],
        [11.313708,  5.656854]],

       [[16.      , 16.      ],
        [11.313708, 22.627417],
        [22.627417, 11.313708]],

       [[32.      , 32.      ],
        [22.627417, 45.254833],
        [45.254833, 22.627417]]], dtype=float32)

2.Try via larger backbones, resnet34 or vgg19

3.Try other networks in TLT as well to see if there is any improvement.

  • try ssd, with lower ratio too.
  • try detectnet_v2. In dectent_v2, set lower minimum_bounding_box_height(try to set to 3), lower minimum_height and minimum_width (try to set to 0) and lower minimum_detection_ground_truth_overlap (try to set to 0.3)

I have tried 2nd and 3rd steps, but still getting the lower mAP. Now I’m experimenting with the first step,

Also i tried with
zoom_min 1.0
zoom_max 8.0
This also didn’t work out.

Should i change the ratios in anchor_box_config?

Yes, you can try.
For detectnet_v2, can you attach your training spec and full training log?
Note: For detectnet_v2 and SSD, all of the images must be resized offline to the final training size and the corresponding bounding boxes must be scaled accordingly.That means if you set 1024544 in the training spec, you need to resize your images offline and you need to modify the bbox(x1,y1,x2,y2) in your label files since you have resized the images from 40962160 to 1024*544.

I want solution for faster_rcnn , which is work with larger object detection.

[quote=“”]

I want solution for faster_rcnn , which is work with larger object detection.

anchor_box_config {
scale: 5
scale: 11
scale: 21
ratio: 1.0
ratio: 0.5
ratio: 2.0
}

Is this a right idea ? i have reduced the scale value again.

87/4 =21.75
54/4 =13.5

Hi samjith888,
For anchor_box_config {
scale: 8.0
scale: 16.0
scale: 32.0
ratio: 1.0
ratio: 0.5
ratio: 2.0
}

The anchor will be

array([[[ 8.      ,  8.      ],
        [ 5.656854, 11.313708],
        [11.313708,  5.656854]],

       [[16.      , 16.      ],
        [11.313708, 22.627417],
        [22.627417, 11.313708]],

       [[32.      , 32.      ],
        [22.627417, 45.254833],
        [45.254833, 22.627417]]], dtype=float32)

because
8*sqrt(1)= 8
8*sqrt(0.5)= 5.656854
8*sqrt(2)  = 11.313708
16*sqrt(1)= 16
16*sqrt(0.5)= 11.313708
16*sqrt(2)  = 22.627417
32*sqrt(1)= 32
32*sqrt(0.5)= 22.627417
32*sqrt(2)  = 45.254833

If you change anchor_box_config , please calculate as above way, to see if it can cover your small objects.

Hi Morganh,

Is the faster_rcnn can't detect smaller objects? can u suggest some more changes in faster_rcnn train spec files?

When observed in label file, i found that two objects have an average size like following
Mssing_P 25x23
Extra_P 26X13

These two objects are the smallest objects in my dataset. (Image resolution : 4096*2160 )