I would suggest using a service or third party for this. Open ALPR, provides an open source package that is very accurate for this service.
Open ALPR - https://www.openalpr.com/
Demo of Video Open ALPR
https://www.youtube.com/watch?v=E-U_H9EbW60
Or you could use an API -
Macgyver Computer Vision API
https://askmacgyver.com/explore/program/license-plate-recognition/3X5D3d2k
In this API you would simply make a post request to -
https://macgyver.services
Example Payload
{
id: "3X5D3d2k",
key: "free",
data: {
"image_url": "https://storage.googleapis.com/marketing-files/program-markdown-assets/license-detection/license-plate.jpg",
"country": "us",
"numberCandidates": 2
}
}
The image above would return the following -
"plate": "284FH8"
"confidence": 90.601013