Extract number plate and state from photo of number plate

Goal
Extract number plate and state from photo of number plate

Progress

  1. Image to text
  2. Split text
  3. Turn split text into an array
  4. Get first item in array
  5. Replace - and .
  6. Get plate (if it isn’t a state, because sometimes a state is the first item in the image and therefore the extracted text)
  7. Get state (if extracted text includes state)

Help needed
If the first text extracted isn’t a number plate, it is usually a state if it isn’t, then how do I get the number plate? Number plates can be in many formats and could be personalised so no real logic. You can see from screenshot example number 4 where first text is NSW not a plate.

For this I would try the OpenAI integration’s Complete chat column, passing it a URL to the image, and asking for the state and number directly in one go. Use the gpt-4-turbo model.

3 Likes