I want to recognize a purple flower between green grass and to do this I will use computer vision. I read that most used methods is OpenCV but I have a problem.

I will use this technique with a robot driven with microcontroller (Arduino) in a campaign where there's not internet connection.

Do you know a library or software to do this without internet connection? I know JavaScript and PHP. Maybe there is a library or software written with one of these languages that I could use?

  • What is the base software you are using with internet connection?
    – user44964
    Commented Mar 14, 2019 at 21:43
  • I have "moved on" from Arduino to EESP32, precisely because I want BT & WiFi. You don't have to use them, of course. If you search for esp32 face recognition there are several hits, such as this and this and this. Presumably, the same principles apply to recognizing flowers
    – Mawg
    Commented Dec 13, 2019 at 6:35

1 Answer 1


I haven't done this yet, but you can use tensorflow.js and one of the many pretrained Models that are available for it (e.g. "vgg16") . This Vgg16 model was trained on a database of ~10 million Images, and certainly there are lots of flowers among these. (This image collection is called IMAGENET by the way)

Then you can use that Vgg16 model file (it's a small binary file, in HGF5 format) and feed it your photograph, and it will come up with ("predict") a label for that photograph. e.g "flower".

You can customize this output, in principle, with your own code, such that tensorflow.js only reports "purple flowers" as success, but that is more advanced material.

Here is a blogpost with two videos of a guy who has done something similar:


I haven't watched these videos in full , but according to the text of the blog post and the embedded file "predict.js" it could be similar to what you want to accomplish.

  • Any success in your solution?
    – mrSidX
    Commented Aug 13, 2019 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.