Plant identification from photos in a gardening app

DesignEasy25 min

Your task

Your gardening app has 2 million users. Someone photographs a plant, and the app shows its 3 most likely names within 2 seconds. The user can tap the right one or type a correction.

The data team has a model that knows 4,000 plants. It is a 300 MB file. It takes 200 ms (milliseconds) to score one photo on one CPU core, once the photo is shrunk to 512 pixels. Your servers have 8 CPU cores each. On spring weekends the app gets up to 30 photos a second, and on winter nights about 1. The team retrains the model every month on photos users have confirmed.

Where does the model run, how many servers does the spring peak need, and how does a new model go live?

It covers

  • Online inference
  • Capacity planning
  • Model rollout