Project

alpr

0.01
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Ruby wrapper for openalpr
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.9
>= 0
>= 12.3.3
 Project Readme

Alpr Gem FOSSA Status

CircleCI

Unmaintained. Read the plate with a small vision model.

I used to maintain this gem. It wraps OpenALPR: a native install, a country runtime, and a state pattern. A small model that can see the photo returns the plate number from the image. Run it locally so the plate stays on your machine.

Gemma 4 E4B is the size to start with. With Ollama:

ollama run gemma4:e4b ./lc.jpg Read the license plate. Reply with the plate number only.

Put the image path before the prompt. Try it on a few of your own photos before you trust the string.

Legacy: OpenALPR wrapper

You'll need to install openALPR. I used brew update && brew install openalpr, on macOS.

For Linux see the official wiki

Installation

Requires Ruby version 2.3 or higher

Add this line to your application's Gemfile:

gem 'alpr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install alpr

Usage

search = Alpr.new("lc.jpg")
puts search.output

For USA license plates specify an optional state pattern (eg. Ohio = "oh" )

search = Alpr.new("lc.jpg", :us, "oh")
puts search.output

Contributing

  1. Fork it ( https://github.com/zjwhitehead/alpr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request