connervieira / Predator

A multi-purpose camera system focused on offline license plate and object recognition
https://v0lttech.com/predator.php
GNU Affero General Public License v3.0
104 stars 14 forks source link

Phantom VS OpenALPR integration #5

Closed khanfar closed 1 year ago

khanfar commented 1 year ago

does alternative version of OpenALPR called Phantom available ? and how to implement ?

connervieira commented 1 year ago

Phantom is a modified version of OpenALPR, designed to integrate more smoothly with Predator. Predator is capable of using both Phantom and OpenALPR.

The installation process for Predator is described in the DOCUMENTATION.md file. The installation process for Phantom is documented in it's respective DOCUMENTATION.md file as well.

khanfar commented 1 year ago

Give me github link for that

connervieira commented 1 year ago

All documentation is bundled with Predator. You can find step by step installation instructions for all dependencies, including Phantom in the DOCUMENTATION.md file, as described above.

khanfar commented 1 year ago

Thanks

khanfar commented 1 year ago

i do all requirenments setup then try run i got this error : python3 main.py Loading Predator... Traceback (most recent call last): File "/home/pi/Predator/main.py", line 46, in import utils # Import the utils.py scripts. File "/home/pi/Predator/utils.py", line 89, in import cv2 # Import OpenCV ModuleNotFoundError: No module named 'cv2' pi@raspberrypi:~/Predator $

khanfar commented 1 year ago

i do this sudo apt install python3-opencv then i try gain then i got this error : python3 main.py Loading Predator... Traceback (most recent call last): File "/home/pi/.local/lib/python3.9/site-packages/numpy/core/init.py", line 23, in from . import multiarray File "/home/pi/.local/lib/python3.9/site-packages/numpy/core/multiarray.py", line 10, in from . import overrides File "/home/pi/.local/lib/python3.9/site-packages/numpy/core/overrides.py", line 6, in from numpy.core._multiarray_umath import ( ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/.local/lib/python3.9/site-packages/numpy/init.py", line 140, in from . import core File "/home/pi/.local/lib/python3.9/site-packages/numpy/core/init.py", line 49, in raise ImportError(msg) ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.

Original error was: libcblas.so.3: cannot open shared object file: No such file or directory

Traceback (most recent call last): File "/home/pi/Predator/main.py", line 46, in import utils # Import the utils.py scripts. File "/home/pi/Predator/utils.py", line 89, in import cv2 # Import OpenCV ImportError: numpy.core.multiarray failed to import pi@raspberrypi:~/Predator $

connervieira commented 1 year ago

It looks like you skipped a section in the installation instructions.

In step 1, you'll find instructions on how to install several dependencies of Predator. If you don't need OpenCV functionality, that section also explains how to disable it so Predator can be used without it.

khanfar commented 1 year ago

ok , now i got this : python3 main.py Loading Predator... Traceback (most recent call last): File "/home/pi/Predator/main.py", line 46, in import utils # Import the utils.py scripts. File "/home/pi/Predator/utils.py", line 180, in plate_file = open(plate_file_location, "r") # Open the plate log file for reading. FileNotFoundError: [Errno 2] No such file or directory: '/home/cvieira/Software/Support/Predator/Interface//plates.json'

connervieira commented 1 year ago

Please make sure you complete the step by step installation instructions. You're receiving that error because you didn't complete the configuration section in the documentation.

khanfar commented 1 year ago

ok , i wil look but can it read live feed from external camera connected to usb port with raspberry ? like xbox kinect camera ?

connervieira commented 1 year ago

Predator can interface with USB cameras that are supported by FSWebcam. An Xbox Kinect camera is unlikely to work due to its proprietary nature. In any case, an Xbox Kinect camera is highly unlikely to perform well for ALPR, since it's primarily designed for motion capture, and won't have a lens that's ideal for license plate reading.

khanfar commented 1 year ago

{ "general": { "working_directory": "/home/cvieira/Software/Support/Predator/Working/", "interface_directory": "/home/cvieira/Software/Support/Predator/Interface/", "alpr": { "engine": "phantom", "guesses": 5, "license_plate_format": "" }, "alerts": { "alerts_ignore_validation": true, "allow_duplicate_alerts": true, "databases": ["https://v0lttech.com/predator/plates/emergency.json"] }, "display": {

here need to change the directory ? and create json ?

connervieira commented 1 year ago

The instructions for configuring Predator can be found in the documentation. Please follow the step by step instructions.

khanfar commented 1 year ago

general": { "working_directory": "/home/pi/Predator/", "interface_directory": "/home/pi/Predator/", "alpr": { "engine": "phantom", "guesses": 5, "license_plate_format": ""

this correct ?

khanfar commented 1 year ago

i read but cant find were need to edit sorry english language not main language

connervieira commented 1 year ago

The documentation file links to the CONFIGURATION.md file. This file contains instructions for each configuration value, and how to set values in the config.json file

khanfar commented 1 year ago
python3 main.py
Loading Predator...
1687895814.2937879562 (9.8545131683) - Loading networking libraries
1687895814.2941143513 (0.0000531673) - Loading ignore lists
1687895815.3350093365 (1.0407371521) - Loading object recognition
Error: The object recognition libraries could not be imported.
Press enter to continue...
1687895834.3625004292 (19.0271673203) - Initial loading complete

                                          PREDATOR
                            COMPUTER VISION SYSTEM

1687895834.3634505272 (0.0006871223) - Playing 'startup' sound
1687895834.3636441231 (0.0000512600) - Validating configuration
Error: The 'realtime>image>camera>device' configuration value does not point to a valid file.
Press enter to continue...
Please select an operating mode.
0. Management
1. Pre-recorded
2. Real-time
3. Dash-cam
Selection: 2
1687895867.8784439564 (33.5146539211) - Started real-time mode
1687895867.8788006306 (0.0000586510) - Loading license plate history
1687895867.8814659119 (0.0024783611) - Loading license plate alert list
1687895868.5375804901 (0.6558525562) - Starting main processing loop
1687895868.5378708839 (0.0000388622) - Capturing image
1687895868.5919723511 (0.0539679527) - Running ALPR
/bin/sh: 1: alpr: not found
Error: The JSON data returned by the ALPR process is malformed. This likely means there's a problem with the ALPR library.
Press enter to continue...
1687895873.9748575687 (5.3825280666) - Organizing ALPR results
Plates Detected: 0
1687895873.9754004478 (0.0002224445) - Running object recognition
Traceback (most recent call last):
  File "/home/pi/Predator/main.py", line 1409, in <module>
    object_recognition_bounding_box, object_recognition_labels, object_recognition_confidence = cv.detect_common_objects(image) # Anaylze the image.
NameError: name 'cv' is not defined

pi@raspberrypi:~/Predator $ 
connervieira commented 1 year ago

You're receiving errors because you haven't completed the installation. Please follow the installation instructions found in DOCUMENTATION.md before attempting to run Predator. Once you reach the "Usage" section in the installation instructions, you can start using Predator.

khanfar commented 1 year ago

i will try . thanks