Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the performance of small object detection #191

Open
jacobssy opened this issue Mar 19, 2018 · 18 comments
Open

the performance of small object detection #191

jacobssy opened this issue Mar 19, 2018 · 18 comments

Comments

@jacobssy
Copy link

jacobssy commented Mar 19, 2018

Hi,Thanks for sharing the code! it is really a great work you have done !
I tried my own data followed by the "Yolo Step_by_Step.ipynb", but the performance is not good.
the dataset is about traffic_signs including 39000 pictures divided to 43 classes.every picture is 60-120 pix, I Trained with 80 epoch, I adjust the input value from 416 to 192,the training index looks good, here is the screenshot:
train
but when I test the model in test data set(including 900 pictures,1360x800 pix,every picture includes 1-4 class of traffic_sign),it nearly not work, the detection boxes does not appear
So,I have a question about whether the yolo model could have good performance of small object detection,would you please give me some suggestions about my work? or some improvement about my training or testing ?
@experiencor

@jacobssy
Copy link
Author

add a screenshot of training index after 80 epoch:
image

@Sayantan17
Copy link

Sayantan17 commented Mar 19, 2018

@jacobssy buddy can u share the file with me as I am getting lots of errors. (Ipynb file) that epoch steps I m stuck from past 10 days.

@jacobssy
Copy link
Author

@Sayantan17 Hi,I just modify some data input(according to my dataset),actually I did not do any other special work on the ipynb,I update the file to my repo https://github.com/jacobssy/Traffic_Sign_detection/tree/master/detection , if you have some questions about the ipynb file ,I would try to help you :)

@Sayantan17
Copy link

@jacobssy yeah sure.

@orsveri
Copy link

orsveri commented Mar 19, 2018

@jacobssy Hi, I had such problem. Have you tried to lower threshold of boxes confidence? In my case I set threshold to 0 and there was a boxes. Then I load weights to model, enlarged scales in config file (object_scale and class_scale) to 10, and made another 20-30 epochs. The result become better! Now I am trying different scale values and data to make result good for me.
7

@jacobssy
Copy link
Author

@orsveri oh , it looks good ,Thanks a lot ! I am trying that , do you also use the same dataset(GTSRB),it seems that you did not use so many classes of traffic signs, you just make all different traffic sign into one class to train the model.

@orsveri
Copy link

orsveri commented Mar 19, 2018

@jacobssy I am glad to help you :)
I used LISA dataset. I was afraid that large number of classes with tiny yolo will give me a bad result, so I started from one class. And there is quite different looking signs in my country, so now I am preparing my own dataset with several classes (about 10).

@jacobssy
Copy link
Author

@orsveri Hi, I have trained the yolo model again, this time ,I just modify the class of traffic sign to one class ,I use GTSDB data (including 900 pictures,1360X800 pix),and I tested in LISA dataset, I found it looks better than my last result.it seems to have no important relationship with threshold ,scale value(the lower threshold ,the more objects will be detected ,refer to my screenshot),the result is worse than yours,you could also use the GTSDB dataset to test your model.
high threshold
low threshold

and I have a very critical question about multiple classes detection ..
if I only have lots of small pictures of multiple traffic signs without annotation(more than 30000 pictures),and fewer big pictures of traffic signs with annotation ,what could I do to train my model?
and I think this question could be extended,in many cases, We also meet the same question, I tried some detection model,I found it has a very critical condition which should lots of data with annotation,but in fact ,we can not get lots of data with annotation in specific practical situation,so, have you some tips to do this kind work? if there any paper could be referred?
sorry for my poor English,I tried to make my question understandable :)

@orsveri
Copy link

orsveri commented Mar 20, 2018

@jacobssy Thank you, it's a good idea about testing on GTSDB, I will try when I have more time.
If you have only big pictures of signs (as I understand, with big signs) with annotation, and want to detect signs that have smaller size, you may use augmentation. I mean, you can zoom out your big-signs images, and fill borders with pixel values of edges. Also you can apply some geometric transformations to change image a little. It's a common way to make a dataset larger.

@gauthsvenkat
Copy link

I'm working on a similar data with straws to count and find the number of straws in the given image. However for some reason YOLO cannot seem to learn to predict straws.
img_20180219_102112_detected

Are there any possible solutions to improve my model ?

@experiencor
Copy link
Owner

@andohuman Yes. You may try to generate your own anchors using gen_anchors.py.

@gauthsvenkat
Copy link

@experiencor I am using my own anchors. I tried using 7 anchor boxes instead of five but there is very little difference.

@experiencor
Copy link
Owner

Ok. So I see lots of false negatives meaning that YOLO fails to detect many straws. Increasing object_class will definitely help in this case.

@R1234A
Copy link

R1234A commented Apr 18, 2018

@jacobssy How did you take variable image size?? Because only one size is given in config.json file??

@jacobssy
Copy link
Author

@R1234A Basically,I take the variable image size by experiments, I adjust the parameter from 416,448,480.. according to my gpu memory

@R1234A
Copy link

R1234A commented Apr 18, 2018

@jacobssy But u have 1360X800 pix dimension image. So if you are adjusting your parameters from 416,448,480.. , but that will make your image size smaller right and fixed too like (416X416) or (448X448) or (480X480). Can you tell to give exactly same image as input to Full Yolo architecture as 1360X800 pix. without fixing it??

@jacobssy
Copy link
Author

@R1234A emmm. here code "image = cv2.resize(image, (self.config['IMAGE_H'], self.config['IMAGE_W'])" it will resize the image to the input parameter you set, if the size is 1360x800 pix, it will be changed to fit the input size when you use Fullyolo. sry my poor English, maybe I did not understand your question :)

@experiencor
Copy link
Owner

yes, that's what it does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants