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

Image detection failed with yolo_tiny_coco #3

Closed
rmenoli opened this issue Aug 10, 2017 · 4 comments
Closed

Image detection failed with yolo_tiny_coco #3

rmenoli opened this issue Aug 10, 2017 · 4 comments

Comments

@rmenoli
Copy link

rmenoli commented Aug 10, 2017

Hi!
I tried to make detection with this two models: yolo_tiny_voc and yolo_tiny_coco. The first model detect the object but the second one don't detect anything. The code I used is it:

yolo_tiny_voc <- image_darknet_model(type = 'detect', 
                                     model = "tiny-yolo-voc.cfg", 
                                     weights = system.file(package="image.darknet", "models", "tiny-yolo-voc.weights"), 
                                     labels = system.file(package="image.darknet", "include", "darknet", "data", "voc.names"))
yolo_tiny_voc

x <- image_darknet_detect("__path__", object = yolo_tiny_voc)

###################################
yolo_tiny_coco <- image_darknet_model(type = 'detect', 
                                     model = "tiny-yolo-voc.cfg", 
                                     weights = system.file(package="image.darknet", "models", "tiny-yolo.weights"),
                                     labels = system.file(package="image.darknet", "include", "darknet", "data", "coco.names"))

##
x <- image_darknet_detect("__path__", object = yolo_tiny_coco)

I would find a model with 80 labels that works in a detection model. I found only a model with 20 labels that works for detection.

Thank you

@jwijffels
Copy link
Contributor

Please share also the image to make this reproducible.

@jwijffels
Copy link
Contributor

You should look at the help of ?image_darknet_model for ready-made-models and the corresponding labels.

@rmenoli
Copy link
Author

rmenoli commented Aug 10, 2017

For any image I tried. yolo_tiny_voc detected correctly in the 20 labels . The output of yolo_tiny_coco is always:
Boxes: 845 of which 0 above the threshold.
I tired about 20/25 images.
An example: https://www.google.it/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwiXhNrZh83VAhXD5xoKHZr_BTUQjRwIBw&url=http%3A%2F%2Feslamoda.com%2F25-divertidas-fotos-que-toda-chica-debe-tener-con-su-mejor-amiga&psig=AFQjCNG1DVRKs-xp_2Mmv6CLD8_PRbPEhA&ust=1502467992926158
yolo_tiny_voc detect 2 person.
yolo_tiny_coco detect 0 object.

@jwijffels
Copy link
Contributor

Please make your example reproducible and use the correct model configuration, trained weights and labels.
For pretrained labels, have a look at https://pjreddie.com/darknet/yolo

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

2 participants