YonghaoHe / LFD-A-Light-and-Fast-Detector

LFD is a big update upon LFFD. Generally, LFD is a multi-class object detector characterized by lightweight, low inference latency and superior precision. It is for real-world appilcations.
416 stars 83 forks source link

Can not detect large objects problem #19

Open lucasjinreal opened 3 years ago

lucasjinreal commented 3 years ago

Hi, I found that If I set crop_size to 400, then I can not detect large objects. even I large crop_size to 600 later, still can not detect large objects.

Do u know why?

lucasjinreal commented 3 years ago

I rechanged cropsize to 600. still can not detect relatively large objects, I am traning detect human only:

image

lucasjinreal commented 3 years ago

This is very ridiculous: (trained 200 epochs on CrowdHuman, nothing can be detected)

image

YonghaoHe commented 3 years ago

@jinfagang You may downsample images by 2x or even 3x. You have to know that the detection range of the detector is controlled by config_dict['detection_scales'] = ((4, 20), (20, 40), (40, 80), (80, 160), (160, 320)), namely [4, 320]. The crop_size should be larger than 320 here, but not too large. If crop_size is too large, it will greatly reduce the training speed.

lucasjinreal commented 3 years ago

@YonghaoHe what's the unit of 4, 20..? what's the [4, 320] mean? Pixels? Why fixed it to 320? is that possible add (320, 640) in it?

Actually I tried 400 and 512 and 600 in crop_size, all same behavior. Can not detect human the this size...

lucasjinreal commented 3 years ago

@YonghaoHe Seems change detection_scales involved output_indices: image

Any guidlines how to modification?

lucasjinreal commented 3 years ago

@YonghaoHe Any help? I want add a scale.

YonghaoHe commented 3 years ago

@jinfagang I think you do not grasp some basic concepts. [4, 320] (in pixels) is object scale that the detector can detect. Of cause you can set it as your need. crop_size only controls the input size and it should be larger than the upper bound of object scale, say 320 here. But too large input size will greatly reduce the training speed, it is easy to understand. You can see this page for more details

lucasjinreal commented 3 years ago

@YonghaoHe Can u give an example how to add a scale? It need changed a lot of settings....

lucasjinreal commented 3 years ago

@YonghaoHe Also, I don't think scale is the issue of large object can not detect problem. the input resolution is resized, I tried resize my image to 512, still can not detect human in such input resolution..

lucasjinreal commented 3 years ago

@YonghaoHe Can u help?

lucasjinreal commented 3 years ago

@YonghaoHe Can u try train a model on Crowed Human? I think LFD will fail on this dataset.....

YonghaoHe commented 3 years ago

@jinfagang Ok, I will try, you just provide the dataset.

lucasjinreal commented 3 years ago

@YonghaoHe OK, I am simply using CrowdedHuman, can u provide a test on that? Since CrowdedHumna also a dense detection task and very challenge, also, it can test LFD performance and evident it's effectness.

YonghaoHe commented 3 years ago

@jinfagang You mean this dataset?

lucasjinreal commented 3 years ago

@YonghaoHe Yes.

lucasjinreal commented 3 years ago

@YonghaoHe any updates?