sclaflin/Plate-Minder

docker desktop for windows issue

Closed this issue · 6 comments

Hi!

I have everything working yet SQLite DB doesn't get updated nor do any images show up in the data folder. Config is made via web interface. I even walked past with a number plate in hand but nothing got recorded. container info is atached as an image and config is given below. Stream is fine in VLC. (docker-compose didnt assign a port to open-alpr-http-wrapper, so i added 3000 there as it didnt do anything without it either, so i thought maybe this was the issue, although in the open-alpr-http-wrapper container config file port was 3000)

Config file

sources:
  - type: rtsp
    name: School Front Gate
    captureInterval: 1
    preInputArgs: []
    preOutputArgs: []
    url: rtsp://XXXX
  - type: rtsp
    name: MussanifOffice front
    captureInterval: 1
    preInputArgs: []
    preOutputArgs: []
    url: rtsp://XXXX
  - type: rtsp
    name: Gate Inside
    captureInterval: 1
    preInputArgs: []
    preOutputArgs: []
    url: rtsp://XXXX
  - type: rtsp
    name: mussanif SD stream
    captureInterval: 1
    preInputArgs: []
    preOutputArgs: []
    url: rtsp://XXXX
filters: []
openALPR:
  url: http://open-alpr-http-wrapper:3000/detect
recorders:
  - type: sqlite
  - type: file
    pattern: ./data/images/{{DATE}}/{{SOURCE}}/{{TIME}}_{{PLATE}}.jpeg
    retainDays: 30
restService:
  enable: true
  port: 4000

docker-compose file

version: "3.9"
services:
  plate-minder:
    container_name: plate-minder
    restart: unless-stopped
    image: sclaflin/plate-minder:latest
    ports:
      - 4000:4000
    volumes:
      # Set's the docker container to the host container local time
      - /etc/localtime:/etc/localtime:ro
      - ./data:/app/data
      - ./config.yaml:/app/config.yaml
  open-alpr-http-wrapper:
    container_name: open-alpr-http-wrapper
    restart: unless-stopped
    image: sclaflin/open-alpr-http-wrapper:latest
    ports:
      - 3000:3000
  plate-minder-web:
    container_name: plate-minder-web
    image: sclaflin/plate-minder-web:latest
    restart: unless-stopped
    environment:
      - PLATE_MINDER_URL=http://XXXX:4000
    ports:
      - 8080:80

Stack screenshot from portainer
image

It sounds like you've got it up and running but the only issue is that no plates are detected? It may be that the camera(s) you have just haven't produced a clear enough image where a plate can be read.

For a sanity check, you could try a google image search for license plates and save some of them. Next, point your browser to port 3000 on your docker host (where you have open-alpr-http-wrapper running) and upload them manually. If it's working, you should get a JSON response with plate detection data.

If you can confirm that it's at least detecting plates, then you can try and capture a still image from one of your cameras with a plate in it and upload that.

Thanks for the response! Will definitely give this a try, however there is one issue, I am not sure how to do this...

For a sanity check, you could try a google image search for license plates and save some of them. Next, point your browser to port 3000 on your docker host (where you have open-alpr-http-wrapper running) and upload them manually. If it's working, you should get a JSON response with plate detection data.

How do I do this? `^-^

Do I input the internal IP, in this case 172.18.0.4:3000 in the browser of windows from the host computer? Will it have a button or something to upload the image there?

I am doing this in a school in Pakistan. It opens in the morning, will check it out first thing in the morning and post screenshots of the feed. Do you suggest putting up a shapes filter?

Open your web browser, and navigate to: http://<ip-address-of-your-docker-host>:3000
You should see a web page with a form that you can upload an image with.

A shape filter is just going to block out parts of the image where you don't want to recognize plates. For instance, date/time stamps from the camera feed should be blocked out to avoid false positives.

Bingo! Thanks a ton!

Tried plates from the web, they worked. Tried screenshots from DVR software, nothing was returned. Even though the plate was readable by eye, it wasn't by openalpr. Cameras are mounted at a height.

Some local pakistani plates from the web also didn't return results. It was sort of a hit and miss. Local plate addition and better camera stream quality and positioning would've helped.

I checked it at my home setup as well which uses same hardware as the school and got same results. One thing though, my home setup is a Core2Duo ubuntu server and the jelly process made the CPUs run like crazy, at times causing a reboot due to overheating i guess. Couldn't leave the plate-minder stack running there.

Great work you're doing here, keep it up and thanks a ton!

Some local pakistani plates from the web also didn't return results. It was sort of a hit and miss. Local plate addition and better camera stream quality and positioning would've helped.

That makes sense. Because all I've done is written a wrapper around OpenALPR, Plate-Minder ultimately is as effective as the source OpenALPR was compiled from. I do believe there is a way to have it work better for your locale, but I haven't dug too deep into it. This project started off as a hasty proof of concept and there's still quite a few rough edges. If you're willing to solve this, the Open ALPR HTTP Wrapper project would be a good place to start. I'm happy to accept pull requests!

One thing though, my home setup is a Core2Duo ubuntu server and the jelly process made the CPUs run like crazy, at times causing a reboot due to overheating i guess. Couldn't leave the plate-minder stack running there.

Yeah, ffmpeg does a lot of heavy lifting. If you're fortunate enough to have a supported video card or on-board hardware acceleration (i.e Intel QuickSync), running the software becomes a lot more feasible on modest hardware.

Im an accounting graduate and the internet has been a wonderful teacher for my barely existent programming skills. Maybe one day I will take you up on it :P

Thank you so much for your time and for the effort you have put into this software. Cheers!