apple / turicreate

Turi Create simplifies the development of custom machine learning models.
BSD 3-Clause "New" or "Revised" License
11.19k stars 1.14k forks source link

object detection : pls support higher image resolutions #1817

Open romanoss opened 5 years ago

romanoss commented 5 years ago

as I found out the tiny yolo network has a quite poor detection performance for my project compared to the much bigger full yolo model. but when you train with a param setting of 608x608 for image size, its gets quite better. For me the tiny yolo model is rather useless except when trained with higher image resolutions (I tried this with darknet from AlexeyAB with images size 608 and parameter random=1. which leaded to a 3 times higher training time but far better results). So I would say you really should provide this and other settings as a param for training.

srikris commented 5 years ago

We are exploring the use or larger networks for users who have more memory and computational budget. We'd love to hear your use case and deployment scenario more.

romanoss commented 5 years ago

I just try to build a small app that can recognize tropical fish. When visiting an aquarium or when people are snorkeling, one is usually overwhelmed by the richness and diversity of the species one is watching. So giving the people an app which can recognize a species and provide further information about it, could be a nice additional experience.

pusateri commented 5 years ago

Does this apply to the image similarity model as well? I am noticing poor matching for trained images and wonder if I can force it to use higher quality images.

romanoss commented 5 years ago

I did not try - sorry

lp55 commented 5 years ago

I'm also have the same problem. For small object detection, the resolution really affects precision. The object_detector.create should really have a resolution parameter. I'm gonna take a look at the code and see if this is easy to implement. Any hints?

Random would be nice, but that could be done when building the sframe, so it's not critical.

romanoss commented 5 years ago

probably in object_detector.cpp: GRID_SIZE*SPATIAL_REDUCTION results in 416 but dont know about memory implications

did u manage to use a retrained yolo model in an android app and if yes how :) ?

lp55 commented 5 years ago

Yes, I did some searching / reading and found out about the grid_size variable on turicreate\src\unity\toolkits\object_detection\object_detector.cpp and on turicreate\src\unity\python\turicreate\toolkits\object_detector\object_detector.py. Seems pretty trivial to make that a param in the create function. Any catches? Anything else I have to change?

I'll fork this, change the code and create a pull request :)

romanoss commented 5 years ago

I dont know about memory implications

did u manage to use a retrained yolo model in an android app and if yes how :) ?

romanoss commented 5 years ago

I am currently trying to train a mobilenet with tf and going from there to an ios and android model

write me an email, so we can talk as it seems we are stuck in quite the same problems

nickjong commented 5 years ago

Our object detection toolkit is unfortunately in a bit of a transient state, as we're porting the original Python-based implementation in object_detector.py to the C++-based one in object_detector.cpp. If you want some results sooner rather than later, the Python implementation is the one currently used by Turi Create.