Building an Offline Plant-Safety App with AI: The Giyahbin Story

You are in the wild, there is an unfamiliar plant in front of you and no signal. How do you know whether it is toxic?

AI helped build Giyahbin by gathering data from papers and PDFs, writing code and drafting tests, while the goals, red lines and fact-checking stayed with a human. The result is a free offline app covering 125 plants. The app itself contains no AI model and its output is only an estimate; no expert has reviewed the data yet.

By Saman Ghahreman · Published: · 7 min read

Case studies and build experience

Building an Offline Plant-Safety App with AI: The Giyahbin Story

A traveller sees a plant outdoors and cannot tell whether it is toxic. There is no internet either. That is why Giyahbin exists: a free offline Android app with 125 toxic and safe plants of Iran. This article explains where AI helped build it, where it did not, and why the app’s output is only an estimate.

What was the problem and what were the constraints?

The goal fit in one sentence: a traveller should quickly learn whether a plant is toxic and get a clear warning if it is. Three constraints shaped everything.

  • Offline: there is no signal on a mountain trail, so the app has no internet permission.
  • Free: no subscription, ads or in-app purchases, ever.
  • Light: a small download that runs on ordinary phones; the current build is about 2 MB.

What did we hand to AI and what did we not?

AI gives speed, but the goal and safety stay with a person. This table is the real division of labour on this project.

TaskAIHuman
Finding sources and reading PDFsDeep search, summaries and a plant listChecking key claims and recording gaps
Writing app code and toolsApp code and build scriptsDesign decisions and the app’s boundaries
TestingWriting data and logic testsTesting on a real phone with real photos
Goal and red linesSuggested optionsThe final call: free, offline, no trackers
Scientific review of plant toxicityCannot helpNot done yet; a specialist must do it
How Giyahbin was built
  1. Define the problem

    One sentence plus three constraints.

  2. Deep research

    Reading scientific papers and PDFs with AI help.

  3. Build data and app

    125 plants, freely licensed photos and the app code.

  4. Real-world tests

    Data tests, a real phone and real photos.

  5. Honest release

    State the limits, publish a privacy policy and the sources.

Where did the plant data come from?

With AI help and deep web research, we collected scientific papers and PDFs about toxic plants in Iran. A review paper on Iran’s poisonous plant biodiversity lists about 200 species in 75 genera and itself says no complete reference list exists.

We also found no official, complete list of toxic plants per province, so claiming “exact provincial distribution” would have been a lie. Instead the distribution is regional and approximate: eight regions mapped to 31 provinces. The lesson: do not hide missing data, announce it.

Why doesn’t the app recognise plants from a photo with AI?

Accurate photo identification usually needs an online service, an account and a key, and the free tier has a cap. That clashes with “free and offline”, so we dropped it. In its place we built “guided identification”: you choose the plant type, flower or fruit colour and habitat, and the app lists similar plants with their toxicity.

The price of this decision is lower accuracy, and the app says so. The benefit is that the app has no internet permission and nothing leaves the phone. Without photos the app is about 40 KB; with 123 photos it reaches about 2 MB.

What did testing find?

  • Data tests: 125 plants, 504 trait combinations and 31 provinces, including a check that any result containing a toxic plant shows a warning.
  • Real-phone tests: camera, gallery, screen rotation, cancel, and 800 random events with no crash.
  • Seven real photos: the right plant was in the list in all seven and ranked first in four (oleander, thorn apple, poison hemlock, foxglove). Harmless plants (dandelion, mint, wild rose) ranked 10th to 13th because the app deliberately puts toxic plants first on equal scores.
  • Mistakes found only by looking: the “chrysanthemum” photo was actually a Japanese coin and the “chestnut” photo was just a bud (removed).

The last item shows why you should not trust AI output alone: something that looks right on screen can be wrong.

Where should you not rely on this app or on AI?

  • Eating wild plants or mushrooms: never eat anything based on this app alone; if in doubt, treat it as toxic.
  • Definitive identification: the app lists look-alikes, not a final answer.
  • Toxicity data: no toxicologist or botanist has reviewed it yet, so it may be incomplete or wrong.
  • Exact distribution: it is regional and approximate only.
  • Poisoning: call emergency services (115 in Iran) or the poison information centre (1490) at once.

What did we learn about building apps with AI?

  1. Write the problem in one sentence with its constraints, then bring in the AI.
  2. Check every important claim against a source yourself and write down the gaps.
  3. Keep the core decisions (like staying free) with you and state their cost plainly.
  4. Test on a real device with real data; automated tests alone are not enough.
  5. Say where you used AI. Google’s guidance also recommends transparency about AI use.

The app’s photos are from Wikimedia Commons under free licences, and the photographer and licence of every photo are in the photo credits list. If you want more offline apps built by one person, read the case study of four Persian offline apps.

Where can I get the app?

Giyahbin is free and downloads directly from the Giyahbin page; its privacy policy is there too. Other free apps will appear in the free apps section. For another example of an offline app with an on-device model, read the Hazeri article.

Frequently asked questions

Does Giyahbin identify plants from a photo with AI?

No. The app has no AI model and does not analyse the photo. “Guided identification” only lists similar plants and their toxicity from three traits you choose, and the result is an estimate.

What exactly did AI do in building Giyahbin?

It helped with deep search and summarising papers and PDFs, writing the app code and tools, and drafting tests. The goal, core decisions, real-phone testing and release stayed with a human.

How reliable is Giyahbin’s information?

It was gathered from scientific papers, but no toxicologist or botanist has reviewed it yet, so it may be incomplete or wrong. Never eat any wild plant or mushroom based on this app alone.

Why is Giyahbin free?

It is a public-good project for the awareness of travellers and hikers. It has no subscriptions, ads, in-app purchases or data sales, and its code is open under the MIT licence.

Sources

Tags: build an app with AI · plant safety app · toxic plants of Iran · offline Android app · AI-assisted data gathering

Get advice on Android App Development

One short consultation is enough to clarify the path, timeline and rough cost of your project.

My promise
If you have a problem you think AI might solve, write to me. I’ll tell you honestly whether it will; sometimes the answer is no, and hearing that early is cheaper.
Book a consultation