Open PaserSRL opened 4 years ago
Run training with -show_imgs
flag at the end of training command, and press ESC button for next images, and look are there any images similar to cars in the shade?
Add more images with car to your training dataset.
How large is your dataset?
Run training with
-show_imgs
flag at the end of training command, and press ESC button for next images, and look are there any images similar to cars in the shade?Add more images with car to your training dataset.
I will try, thanks Alexey
How large is your dataset?
I'm using COCO Dataset 2014, so around 80K images
How large is your dataset?
I'm using COCO Dataset 2014, so around 80K images
You should try to add some labeled images with shadows, maybe the dataset doesn't have any similar or enough samples.
For the moment I've added CLAHE filter to frame, in order to equalize it.
Reference: https://docs.opencv.org/master/d5/daf/tutorial_py_histogram_equalization.html
UP: Frame visualized DOWN: Frame to detect
What mAP (accuracy) can you get with and without CLAHE (adaptive histogram equalization)?
What mAP (accuracy) can you get with and without CLAHE (adaptive histogram equalization)?
Well, is possible to calculate mAP on a live stream? I'm testing it directly on a live stream from IP camera.
Anyway in this moment there no improvement cause it's 2 PM so the light is at maximum, but at morning and late afternoon there is a small improvement (at least on car class). I will make some screenshot with and without it in a few hours.
PS: at this moment I'm using a model trained with exposure = 5.0 so I'm not so confident...
This afternoon is cloudy in Italy. I cannot make tests, I will do some screenshots tomorrow morning :(
Model: YoloV3-tiny-prn Dataset: Coco 2014 Training Resolution: 416x416 Working Resolution: 576x320 Classes: 6 (car, truck, person, cat, dog, bird) Car Treshold: 0.20
Left without CLAHE - Right with CLAHE
It seems that we can test CLAHE and may be include it to the Darknet pre-processing for inference-only (Detection) by setting param [net] clache_inference_preprocessing=1
I used it with this setting: clahe = cv2.createCLAHE(clipLimit=3.5, tileGridSize=(8, 8))
Another comparison
@AlexeyAB Do you think that could help use it during training?
Do you think that could help use it during training?
No, I think it could help only during Detection.
Or may be inverse function could help during Training.
hi @PaserSRL
When you detect, adjust the contrast value.
When we were in the dark background like shadow or night, , our detection was good.
hi @PaserSRL
When you detect, adjust the contrast value.
When we were in the dark background like shadow or night, , our detection was good.
During night also my detection is good, I applied CLAHE filter cause during day some areas could be very illuminated and other are dark. Using CLAHE the image is equalized in order to enchance contrast in dark areas without increase it also in areas already illuminated.
Anyway if you have a suggestion, post it :)
hi @PaserSRL When you detect, adjust the contrast value. When we were in the dark background like shadow or night, , our detection was good.
During night also my detection is good, I applied CLAHE filter cause during day some areas could be very illuminated and other are dark. Using CLAHE the image is equalized in order to enchance contrast in dark areas without increase it also in areas already illuminated.
Anyway if you have a suggestion, post it :)
when you train, use the CLAHE augmentation or luma threshold??
when you train, use the CLAHE augmentation or luma threshold??
None of them, during training I've not used any filter.
I'm tryind to improve yolov3-tiny-prn in order to detect objects inside buildings shadows. At sunrise and sunset the difference between zones illuminated from sun and building shadows is very high, I tried to train yolo changing:
saturation = 1.5 exposure = 1.5
tosaturation = 2.5 exposure = 5.0
but result is not good enought. Has anyone a suggestion?