How to get Poison Ivy, with AI!

Ben Burke
4 min readApr 12, 2023

--

2 years ago I got poison ivy for the first time.

I wouldn’t recommend it.

Photo by James Whitney on Unsplash

As a kid I remember playing around it but never having a reaction.
(It was later, while I was lathered in calamine lotion lamenting my situation to my mother, I learned she was making me wash up)

So, my failure to learn as a child did me in as an adult.

The wounds were continually open for 2 weeks.

The itch to itch was almost unbearable.

Vinegar swabs and baths only provided minimal relief.

When you have poison ivy wounds your perspective changes:
- You remember the good ol’ days when you were free from itching.
- You think poison ivy would do a better job to deter thieves than a security system
AND
- You thank the Lord everyday for the person who invented Calamine lotion

Never Again

By day, I’m a Data Scientist, by night I love tinkering (3D modeling, circuits, woodworking, etc.).

As I worked to develop my skills in Deep Learning I found a great course from fast.ai. The set of lessons not only teaches how to create a vision ML model BUT ALSO teaches how to deploy it, using free tools!

The course encourages creativity when choosing what you want to create.

The scars from poison ivy may not be visible, but they run deep in my long-term memory. So I decided to create a tool to help me identify this specific infectious plant.

Surprisingly, it’s really difficult for people to judge if it’s poison ivy or not.
(Don’t believe me? Try this quiz and let me know your score.)

So, in an effort to learn a new skill and save the world from my mistakes (you can thank me later), I created a poison ivy image recognition model.

What this blog will be

Here, I’m going to write about my journey with this fast.ai course: thoughts, impressions, snags, and findings. Sometimes it might be technical, sometimes it might be high-level.

Hopefully all of it will be helpful.

A quick note about me

I love doing.

I don’t feel like I’ve done or experienced something unless I’ve touched it in multiple dimensions. This is another reason the fast.ai course is appropriate for me. The entire course is written in Jupyter Notebooks, and code an be executed while reading the text.

I also like quick results.

I like to breakdown all the barriers and get to the end as fast as I can. THEN I go back and fix/update/change pieces of the process to make them run more efficiently. This is evident as I wood work.

I don’t get all my measurements first.
I don’t read the instruction manual for every tool.

I draw up a prototype. Maybe even make a wireframe model.

Then I work backwards:

  1. Get the dimensions
  2. Figure out the hardware location
  3. Pick the best tools

This is one of the chief principles of the Agile Methodology: “early and continuous delivery of [a] valuable [product]”.

Getting started

I won’t reiterate everything in the course, you’re welcome to start taking it, it’s free online!

What I appreciated about this course was the instructor, Jeremy Howard, finds all free resources for you to use while teaching you how to use them.

IDE w/ free GPU: Kaggle notebooks or Google’s Collab
Model Hosting: Hugging Face + Gradio
Code Repo: Git Hub

After lesson 2 you should be able to deploy your working model on hugging face.

Here’s my first version. Let me know your thoughts.

While I appreciated the free aspect, I found this will not be an automated process for retraining and deployment. The process to get a working model for me currently is:

  1. Train/Retrain model in Kaggle (Free GPUs!)
  2. Manually download model from browser
  3. Save model in my Hugging Face repo & commit/push
  4. Create an inference function using Gradio within Visual Studio code and commit/push to Hugging Face

Complicated.

Both Kaggle’s & Google Collab’s git integration is clunky at best. I hope to streamline it more in the future.

For the first iteration of the model, I trained it on resnet 18 and threw a bunch of different plants Google says are commonly mistaken for poison ivy.
- Virgina Creeper
- Box Elder
- Jack-In-The-Pulpit

Next

That’s it for this round.

Stick close so we can reach my goal of no one mistaking Poison Ivy for a non-poisonous plant again.

I just finished the fast.ai course and improved on this model drastically.

Check out how I did it in my other article.

--

--

Ben Burke

I’m a Data Scientist who loves serving. I write about how businesses of all sizes can save time & money and make more money by harnessing data they already have