Git Product home page Git Product logo

parkpow / deep-license-plate-recognition Goto Github PK

View Code? Open in Web Editor NEW
468.0 16.0 119.0 18.93 MB

Automatic License Plate Recognition (ALPR) or Automatic Number Plate Recognition (ANPR) software that works with any camera.

Home Page: https://platerecognizer.com/

License: MIT License

Python 21.12% C# 2.13% C 32.03% C++ 42.92% Java 0.12% JavaScript 0.71% CSS 0.08% Dockerfile 0.24% Batchfile 0.11% Shell 0.53%
ocr machine-learning deep-learning anpr alpr plate-detection bounding-boxes license-plate-recognition number-plate-recognition

deep-license-plate-recognition's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep-license-plate-recognition's Issues

Error With .asf Video Format

Describe the bug
There is an Error when you upload .asf video format. It appears to be an issue with ffmpegcv

Log output:

skew_correction  | INFO   [app.21] => Api Server Startup
video_editor     | DEBUG  [video-editor.140] => Processing video: Sample-1Video.asf
video_editor     | DEBUG  [video-editor.143] => enabled_actions: visualization
video_editor     | DEBUG  [video-editor.149] => CONFIG frames_enabled: False
video_editor     | DEBUG  [video-editor.150] => CONFIG visualization_enabled: True
video_editor     | DEBUG  [video-editor.151] => CONFIG blur_enabled: False
video_editor     | ERROR  [video-editor.288] => Error:
video_editor     | Traceback (most recent call last):
video_editor     |   File "/app/video_editor.py", line 286, in process_video_route
video_editor     |     process_video(file, action)
video_editor     |   File "/app/video_editor.py", line 169, in process_video
video_editor     |     cap = ffmpegcv.VideoCapture(video_path)
video_editor     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
video_editor     |   File "/usr/local/lib/python3.11/site-packages/ffmpegcv/__init__.py", line 151, in VideoCapture
video_editor     |     return FFmpegReader.VideoReader(
video_editor     |            ^^^^^^^^^^^^^^^^^^^^^^^^^
video_editor     |   File "/usr/local/lib/python3.11/site-packages/ffmpegcv/ffmpeg_reader.py", line 59, in VideoReader
video_editor     |     videoinfo = get_info(filename)
video_editor     |                 ^^^^^^^^^^^^^^^^^^
video_editor     |   File "/usr/local/lib/python3.11/site-packages/ffmpegcv/video_info.py", line 25, in get_info
video_editor     |     outinfo['count'] = int(vinfo['nb_read_packets' if do_scan_the_whole
video_editor     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
video_editor     | KeyError: 'nb_frames'
video_editor     | INFO   [werkzeug.96] => 172.19.0.1 - - [20/Oct/2023 06:05:46] "POST /process-video HTTP/1.1" 500 -
^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...

To Reproduce
Steps to reproduce the behaviour:

  1. Try uploading a .asf video file format.

Expected behaviour
The video should process okay

Django CSFR Error

Describe the bug
After setting up ParkPow behind a reverse Proxy all request going through the Proxy are getting a CSFR error

To Reproduce
Steps to reproduce the behavior:

  1. Setup ParkPow with the Provided Docker file behind a Nignx Reverse Proxy for TLS
  2. Connect via Revers proxy and try to login
  3. See error Page with the Error 403 Forbidden (Origin checking failed - null does not match any trusted origins.)

Expected behavior
Have ParkPow available over TLS

Desktop (please complete the following information):

  • OS: Linux & Windows
  • Version: Linux 6.1.0-1parrot1-amd64 & Windows 11 22H2
  • Hardware: HP Elitebook & Lenovo Thinkpad

Additional context
Log entries

2023-05-23 13:39:55 [WARNING] [/opt/pysetup/.venv/lib/python3.11/site-packages/django/utils/log.py:241]: Forbidden (Origin checking failed - null does not match any trusted origins.): /accounts/login/

() {72 vars in 1485 bytes} [Tue May 23 13:39:55 2023] POST /accounts/login/ => generated 1019 bytes in 3 msecs (HTTP/1.1 403) 7 headers in 229 bytes (1 switches on core 2)

Question on using regions properly via python

Hi, thanks for the library.
From the curl examples, it looks like the regions should be specified as form POST data

Would this be the right way?

The API response (via python or curl) doesn't tell me if it actually used the regions, because even if I enter random characters in the region, it still proceeds to detect plates without any region feedback in the response, so I don't know if I am doing it right.

payload = {'regions':['kr','us']}
# payload = {'regions':'crouchingtigerhiddendragon'} # this works as well
                response = requests.post(
                        'https://api.platerecognizer.com/v1/plate-reader/',
                        files=dict(upload=fp),
                        data=payload,
                        headers={'Authorization': 'Token ' + self.apikey})

Thanks

FFMPEGCV cannot process grayscale videos

Describe the bug
FFMPEGCV in video-editor script cannot process grayscale videos.

To Reproduce
Steps to reproduce the behavior:

  1. Send grayscale video to the script.
  2. FFMPEGCV bugs out with KeyError: 'nb_frames' error on this line cap = ffmpegcv.VideoCapture(video_path).

Additional context
Using cv2.VideoCapture instead works fine. Consider switching back to cv2 for reading frames?

issue localhost port 8080: Connection refused

Hi,
I have docker installed in my arm macine.
# uname -m armv7l

I am using raspberry pi docker image. If I run docker then,

# docker run --rm -t -p 8080:8080 -v license:/license -e TOKEN=bc44e48030a5735cdd428e7a231dca19b3d33d03 -e LICENSE_KEY=xxxxx platerecognizer/alpr-raspberry-pi PlateRecognizer v1.20.0 License Key: xxxxx Usage since 2021-04-09: 106/2500 calls. Loading...

issue with connecting localhost:

`# curl -F 'upload=@/tmp/car.jpg' http://localhost:8080/v1/plate-reader/
curl: (7) Failed to connect to localhost port 8080: Connection refused

`

stream_monitor.py not reliable for multiple cameras

Only 1 line is tailed from the docker logs command, so when there are multiple cameras (2 in my case), there's a good chance that over a shorter timeout interval (including the default of 20s) that a camera will be shown as offline when it is actively logging, because the line that was tailed over that interval never happened to be a certain camera
https://github.com/parkpow/deep-license-plate-recognition/blob/master/stream/stream_monitor.py#L78

IMO it would be great if this monitor was part of the Stream image itself and did not rely on having to parse docker logs.

Example of the issue:

Debug output from stream_monitor.py:

2022-08-23 15:04:38,235 DEBUG root Thread-1 : log_line: ['INFO', 'egress-north', '2022-08-23T15:04:33+00']
2022-08-23 15:04:38,235 DEBUG root Thread-1 : No new logs detected
127.0.0.1 - - [23/Aug/2022 15:04:38] "GET / HTTP/1.1" 200 -
2022-08-23 15:04:38,241 DEBUG root Thread-2 : state: 
2022-08-23 15:04:38,241 DEBUG root Thread-2 : {'container_active': False, 'last_log_times': {'egress-north': datetime.datetime(2022, 8, 23, 15, 4, 34, 40497), 'ingress-north': datetime.datetime(2022, 8, 23, 15, 4, 23, 282175)}, 'container_running': True}
2022-08-23 15:04:38,241 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:34.040497] and [2022-08-23 15:04:18.241586]
2022-08-23 15:04:38,241 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:23.282175] and [2022-08-23 15:04:18.241586]
2022-08-23 15:04:38,241 DEBUG root Thread-2 : response
2022-08-23 15:04:38,241 DEBUG root Thread-2 : {'active': True, 'cameras': {'egress-north': {'status': 'running'}, 'ingress-north': {'status': 'running'}}}
127.0.0.1 - - [23/Aug/2022 15:04:39] "GET / HTTP/1.1" 200 -
2022-08-23 15:04:39,286 DEBUG root Thread-2 : state: 
2022-08-23 15:04:39,286 DEBUG root Thread-2 : {'container_active': False, 'last_log_times': {'egress-north': datetime.datetime(2022, 8, 23, 15, 4, 34, 40497), 'ingress-north': datetime.datetime(2022, 8, 23, 15, 4, 23, 282175)}, 'container_running': True}
2022-08-23 15:04:39,286 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:34.040497] and [2022-08-23 15:04:19.286954]
2022-08-23 15:04:39,287 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:23.282175] and [2022-08-23 15:04:19.286954]
2022-08-23 15:04:39,287 DEBUG root Thread-2 : response
2022-08-23 15:04:39,287 DEBUG root Thread-2 : {'active': True, 'cameras': {'egress-north': {'status': 'running'}, 'ingress-north': {'status': 'running'}}}
2022-08-23 15:04:40,237 DEBUG root Thread-1 : Captures: 10
2022-08-23 15:04:40,320 DEBUG root Thread-1 : docker_log: INFO:egress-north:2022-08-23T15:04:38+00:00: Health Score: 70%

2022-08-23 15:04:40,320 DEBUG root Thread-1 : log_line: ['INFO', 'egress-north', '2022-08-23T15:04:38+00']
127.0.0.1 - - [23/Aug/2022 15:04:40] "GET / HTTP/1.1" 200 -
2022-08-23 15:04:40,340 DEBUG root Thread-2 : state: 
2022-08-23 15:04:40,340 DEBUG root Thread-2 : {'container_active': False, 'last_log_times': {'egress-north': datetime.datetime(2022, 8, 23, 15, 4, 40, 320456), 'ingress-north': datetime.datetime(2022, 8, 23, 15, 4, 23, 282175)}, 'container_running': True}
2022-08-23 15:04:40,340 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:40.320456] and [2022-08-23 15:04:20.340253]
2022-08-23 15:04:40,340 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:23.282175] and [2022-08-23 15:04:20.340253]
2022-08-23 15:04:40,340 DEBUG root Thread-2 : response
2022-08-23 15:04:40,340 DEBUG root Thread-2 : {'active': True, 'cameras': {'egress-north': {'status': 'running'}, 'ingress-north': {'status': 'running'}}}
127.0.0.1 - - [23/Aug/2022 15:04:41] "GET / HTTP/1.1" 200 -
2022-08-23 15:04:41,385 DEBUG root Thread-2 : state: 
2022-08-23 15:04:41,385 DEBUG root Thread-2 : {'container_active': False, 'last_log_times': {'egress-north': datetime.datetime(2022, 8, 23, 15, 4, 40, 320456), 'ingress-north': datetime.datetime(2022, 8, 23, 15, 4, 23, 282175)}, 'container_running': True}
2022-08-23 15:04:41,386 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:40.320456] and [2022-08-23 15:04:21.386020]
2022-08-23 15:04:41,386 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:23.282175] and [2022-08-23 15:04:21.386020]
2022-08-23 15:04:41,386 DEBUG root Thread-2 : response
2022-08-23 15:04:41,386 DEBUG root Thread-2 : {'active': True, 'cameras': {'egress-north': {'status': 'running'}, 'ingress-north': {'status': 'running'}}}
2022-08-23 15:04:42,321 DEBUG root Thread-1 : Captures: 11
2022-08-23 15:04:42,408 DEBUG root Thread-1 : docker_log: INFO:egress-north:2022-08-23T15:04:38+00:00: Health Score: 70%

2022-08-23 15:04:42,408 DEBUG root Thread-1 : log_line: ['INFO', 'egress-north', '2022-08-23T15:04:38+00']
2022-08-23 15:04:42,408 DEBUG root Thread-1 : No new logs detected
127.0.0.1 - - [23/Aug/2022 15:04:42] "GET / HTTP/1.1" 200 -
2022-08-23 15:04:42,437 DEBUG root Thread-2 : state: 
2022-08-23 15:04:42,438 DEBUG root Thread-2 : {'container_active': False, 'last_log_times': {'egress-north': datetime.datetime(2022, 8, 23, 15, 4, 40, 320456), 'ingress-north': datetime.datetime(2022, 8, 23, 15, 4, 23, 282175)}, 'container_running': True}
2022-08-23 15:04:42,438 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:40.320456] and [2022-08-23 15:04:22.438102]
2022-08-23 15:04:42,438 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:23.282175] and [2022-08-23 15:04:22.438102]
2022-08-23 15:04:42,438 DEBUG root Thread-2 : response
2022-08-23 15:04:42,438 DEBUG root Thread-2 : {'active': True, 'cameras': {'egress-north': {'status': 'running'}, 'ingress-north': {'status': 'running'}}}
127.0.0.1 - - [23/Aug/2022 15:04:43] "GET / HTTP/1.1" 200 -
2022-08-23 15:04:43,566 DEBUG root Thread-2 : state: 
2022-08-23 15:04:43,567 DEBUG root Thread-2 : {'container_active': False, 'last_log_times': {'egress-north': datetime.datetime(2022, 8, 23, 15, 4, 40, 320456), 'ingress-north': datetime.datetime(2022, 8, 23, 15, 4, 23, 282175)}, 'container_running': True}
2022-08-23 15:04:43,567 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:40.320456] and [2022-08-23 15:04:23.567227]
2022-08-23 15:04:43,567 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:23.282175] and [2022-08-23 15:04:23.567227]
2022-08-23 15:04:43,567 DEBUG root Thread-2 : response
2022-08-23 15:04:43,567 DEBUG root Thread-2 : {'active': True, 'cameras': {'egress-north': {'status': 'running'}, 'ingress-north': {'status': 'offline'}}}
2022-08-23 15:04:44,410 DEBUG root Thread-1 : Captures: 11
2022-08-23 15:04:44,564 DEBUG root Thread-1 : docker_log: INFO:egress-north:2022-08-23T15:04:43+00:00: Health Score: 70%

2022-08-23 15:04:44,565 DEBUG root Thread-1 : log_line: ['INFO', 'egress-north', '2022-08-23T15:04:43+00']
127.0.0.1 - - [23/Aug/2022 15:04:44] "GET / HTTP/1.1" 200 -
2022-08-23 15:04:44,619 DEBUG root Thread-2 : state: 
2022-08-23 15:04:44,619 DEBUG root Thread-2 : {'container_active': False, 'last_log_times': {'egress-north': datetime.datetime(2022, 8, 23, 15, 4, 44, 565161), 'ingress-north': datetime.datetime(2022, 8, 23, 15, 4, 23, 282175)}, 'container_running': True}
2022-08-23 15:04:44,619 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:44.565161] and [2022-08-23 15:04:24.619875]
2022-08-23 15:04:44,619 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:23.282175] and [2022-08-23 15:04:24.619875]
2022-08-23 15:04:44,619 DEBUG root Thread-2 : response
2022-08-23 15:04:44,620 DEBUG root Thread-2 : {'active': True, 'cameras': {'egress-north': {'status': 'running'}, 'ingress-north': {'status': 'offline'}}}
127.0.0.1 - - [23/Aug/2022 15:04:45] "GET / HTTP/1.1" 200 -
2022-08-23 15:04:45,701 DEBUG root Thread-2 : state: 
2022-08-23 15:04:45,701 DEBUG root Thread-2 : {'container_active': False, 'last_log_times': {'egress-north': datetime.datetime(2022, 8, 23, 15, 4, 44, 565161), 'ingress-north': datetime.datetime(2022, 8, 23, 15, 4, 23, 282175)}, 'container_running': True}
2022-08-23 15:04:45,701 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:44.565161] and [2022-08-23 15:04:25.701526]
2022-08-23 15:04:45,701 DEBUG root Thread-2 : Comparing times: [2022-08-23 15:04:23.282175] and [2022-08-23 15:04:25.701526]
2022-08-23 15:04:45,701 DEBUG root Thread-2 : response
2022-08-23 15:04:45,701 DEBUG root Thread-2 : {'active': True, 'cameras': {'egress-north': {'status': 'running'}, 'ingress-north': {'status': 'offline'}}}
2022-08-23 15:04:46,565 DEBUG root Thread-1 : Captures: 12
2022-08-23 15:04:46,674 DEBUG root Thread-1 : docker_log: INFO:egress-north:2022-08-23T15:04:43+00:00: Health Score: 70%

Docker logs for stream over that time period:

INFO:ingress-north:2022-08-23T15:03:48+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:03:48+00:00: Health Score: 75%
INFO:ingress-north:2022-08-23T15:03:53+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:03:53+00:00: Health Score: 75%
INFO:ingress-north:2022-08-23T15:03:58+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:03:58+00:00: Health Score: 75%
INFO:ingress-north:2022-08-23T15:04:03+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:03+00:00: Health Score: 75%
INFO:ingress-north:2022-08-23T15:04:08+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:08+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:13+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:13+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:18+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:18+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:23+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:23+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:28+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:28+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:33+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:33+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:38+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:38+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:43+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:43+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:48+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:48+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:53+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:53+00:00: Health Score: 70%
INFO:ingress-north:2022-08-23T15:04:58+00:00: Health Score: 90%
INFO:egress-north:2022-08-23T15:04:58+00:00: Health Score: 70%

Continously decreasing the API Calls even without a Plate Number

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'alpr_video.py'
  2. Run 'alpr_video.py'
  3. I change the arguments, by passing only the API_KEY also the the Skip. It keeps on decreasing my API_KEY, it looks like API Call/s, I just want to call the API_KEY If the camera sees or detects the plate number from the camera stream.

Expected behavior
I just want to run the alpr_video.py from a camera stream. Then every plate number that would be detected by the camera, I just want to call the API then suddenly it will recognize it.

Image of vehicle
If applicable, add the image you are trying to recognize.

Desktop (please complete the following information):

  • OS: Linux Ubuntu 18
  • Python 3
  • OpenCV 3

Additional context

#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from PIL import Image
import argparse
import cv2
import json
import requests
import tempfile
import time


def parse_arguments():
    parser = argparse.ArgumentParser(
        description='Read license plates from a video and output the result as JSON.',
        epilog='For example: python alpr_video.py --api MY_API_KEY --start 900 --end 2000 --skip 3 "/path/to/cars.mp4"')
    parser.add_argument('--api', help='Your API key.', required=True)
    #parser.add_argument('--skip', help='Read 1 out of N frames.', type=int)
    return parser.parse_args()


def main():
    args = parse_arguments()
    result = []
    cap = cv2.VideoCapture(0)
    frame_id = 0
    while(cap.isOpened()):
        ret, frame = cap.read()
        gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
        cv2.imshow('frame',gray)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

        #frame_id += 1
        #if args.skip and frame_id % args.skip != 0:
            #continue
        #if args.start and frame_id < args.start:
            #continue
        #if args.end and frame_id > args.end:
            #break
        #print('Reading frame %s' % frame_id)
        fp = tempfile.NamedTemporaryFile()
        im = Image.fromarray(frame)
        im.save(fp, 'JPEG')
        fp.seek(0)
        response = requests.post(
            'https://platerecognizer.com/plate-reader/',
            files=dict(upload=fp),
            headers={'Authorization': 'Token ' + args.api})
        result.append(response.json())
        time.sleep(1)
    print(json.dumps(result, indent=2))
    cap.release()
    cv2.destroyAllWindows()


if __name__ == '__main__':
    main()

Stream Calling Endpoint output {"active": True, "cameras": {}}

Describe the bug
I wanted to report a bug that I encountered while using the program. Here are the details:
We have an active license for PR (Plate Recognizer). I have copied the stream_monitor.py file to monitor the heartbeat from my project. In our development environment, we successfully set up the entire process, and everything works as expected.

However, we recently set up a new environment with a different license for 3 cameras. I have already configured 2 cameras in this environment. When I initiate the stream monitor function or file, I receive the following result:

{"active": True, "cameras": {}}

To Reproduce
Here is my config file

[DEFAULT]
timezone = UTC

[cameras]
webhook_target = http://127.0.0.1:8000/en-us/platerecognizer/webhook
webhook_image = yes
webhook_image_type = original, plate
webhook_caching = yes
mmc = true

[[3d92981d-5344-4e0c-8734-181b7a8cd7c0]]
active = yes
memory_decay = 200
url = rtsp://admin:[email protected]:8554/CH001.sdp

[[3cc21d76-3a34-4794-8851-7c1c50bb29b5]]
active = yes
memory_decay = 200
url = rtsp://admin:[email protected]:8554/CH001.sdp

Here is the command I used to monitor:

python strream_monitor.py

Additionally, I have included the script to pull the content response from the exposed URL endpoint:

curl = "http://localhost:8002" logger_detection.info("Requesting Cameras status from %s ... " % curl) response = requests.get(curl)

Expected behavior
Expected Behavior:
I expected the following response:
{"active": true, "cameras": {"3cc21d76-3a34-4794-8851-7c1c50bb29b5": {"status": "running"}}}

Actual Behavior:
However, the actual response I received was:
{"active": True, "cameras": {}}

I would appreciate it if you could look into this issue and provide a resolution. Please let me know if you require any further information or if there's anything else I can assist you with.

Thank you for your attention to this matter.

Installer cannot run Docker.

Describe the bug
The automated installer did not work for me on Ubuntu. It kept asking me to "start Docker", which didn't make sense. I had docker installed, and tried sudo systemctl start docker but nothing ever happened when I clicked "refresh" on the installer wizard website.

Fix
Check if the current user has enough permissions to run Docker and display additional instructions.

Response to the use of ffmpegcv in the code

Hi, dear developer. I'm the author of ffmpegcv, I'm searching the usage cases of the ffmpegcv and appreciate your project for recognition software. As the project refer the ffmpegcv, and comment:

video-editor/video_editor.py: grayscale videos are not supported by ffmpegcv

The ffmpegcv supports 'gray scale' already, and it's faster than reading bgr/rgb.

cap = ffmpegcv.VideoCapture(video_path, pix_fmt='gray')
ret, frame = cap.read()
frame.shape #(H,W,1)
frame  = np.squeeze(frame)  #(H,W)

ffmpegcv cap.fps is not reliable calculate FPS

The ffmpegcv and the opencv read the fps from the video properties. Loop the whole video file is not efficient. Would you be more specific in your case?

Docker run failing with `Low disk space. Make sure to have at least 100MB of free disk space.` error

Describe the bug
When trying to run the current latest image, docker run fails with error

PlateRecognizer v1.27.0
Starting online registration
You have used 2/2 license(s).
License Key: <redacted>
Usage since 2021-12-30: <redacted> calls.
Loading...
Loading detection zones.
Low disk space. Make sure to have at least 100MB of free disk space.

To Reproduce
Steps to reproduce the behavior:
Execute Docker run command as per documentation
docker run --rm -t -p 8080:8080 -v license:/license -e TOKEN=<redacted> -e LICENSE_KEY=<redacted> platerecognizer/alpr

Expected behavior
Container should start rather than terminating immediately

Image of vehicle
n/a

Desktop (please complete the following information):

  • OS: Windows 10 21H2
  • Version: 19044.1466
  • Hardware: Dell XPS 15 (i7-10875H CPU @ 2.30GHz, 32.0 GB RAM)

Additional context
We found the image pushed prior to this latest one was also failing for the same reason (now tagged as platerecognizer/alpr:22-01-25.
Currently the last working version for us running locally or in production is platerecognizer/alpr:21-12-21

Huge caveat here is that I'm assuming those containers are built from this repo ๐Ÿ˜†

An error occurs during recognition

So after I run a plate_recognition.py I got this error: {"detail":"Invalid token.","status_code":403}. What should I do with this? Thanks in advance.

Need Help

I'm having trouble figuring out how to download snapshot images using your API. I've reviewed the documentation, but I'm still unclear on the exact steps or endpoints to use for this purpose.

FFMPEGCV incorrectly reads video fps as 60 most of the time

Describe the bug
FFMPEGCV incorrectly reads video fps as 60 most of the time.
This alters the speed of the videos produced by video-editor.

To Reproduce
Steps to reproduce the behavior:

  1. import ffmpegcv
  2. cap = ffmpegcv.VideoCapture(video_path)
  3. cap.fps

Expected behavior
Should read correct fps.

Additional context
I've replaced it with normal OpenCV fps_cap.get(cv2.CAP_PROP_FPS).
It works better, but also reports incorrect fps (like 2000) for some videos.
I've added FPS environment variable to override auto-detected one for such files, but we need some reliable solution.

Incorrect total_calls (hardcoded to 2500)

Describe the bug
The total_calls parameter in /statistics seems to be hardcoded

To Reproduce
Invoke 'https://api.platerecognizer.com/v1/statistics/

Expected behavior
total_calls should be the summation of all calls per month

Observed behavior
total_calls is hardcoded to 2500

Image of vehicle
N/A

Additional context
Example output (2 successive calls)

# call 1 to stats
Jul  5 11:48:04 homeserver detect:[2920][monitor_m8]: DEBUG [Plate Recognizer API usage stats: {"usage": {"month": 7, "calls": 100, "year": 2019}, "total_calls": 2500}]

# invoke ALPR api to detected

# call 2 to stats
Jul  5 11:49:34 homeserver detect:[2942][monitor_m8]: DEBUG [Plate Recognizer API usage stats: {"usage": {"month": 7, "calls": 101, "year": 2019}, "total_calls": 2500}]

Fellow ALPR developer wanting to connect

Hello Marc!

I'm also working on the plate detection part of an ALPR system and would love to connect with you to discuss some things. I've created a pretty good model using Yolov3 and a custom dataset. You can reach me at [email protected]

Ps, sorry about creating an issue but I couldn't connect on LinkedIn without premium

Other Country

Will it work for the philippine plate country?

Thanks in advance for your reply.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.