#How to use? insert a video path and output file in get_args method in main. The output will be then stored in output file.
This is the base template for the License Plate Recognition project from the CSE2225 Image Processing course.
The goal of the project is: given an input video you should recognize the license plates.
You can see an example video under dataset/dummytestvideo.avi.
We recommend splitting the video into a training set and a testing set, and only using the testing part as a way to calculate your expected score.
This is important because for grading we use a totally different video.
You can see an example of output under dataset/sampleOutput.csv.
Your output file should be in the same format.
The shell script evaluator.sh is used for running the project and calculating scores.
This file initially runs your main.py file, followed by evaluation.py.
Do not modify either one of evaluator.sh or evaluation.py if you want to see proper outputs.
Rest of the project:
CaptureFrame_Process.pyfor reading the input videoLocalization.pyfor figuring out the location of the plate in a frameRecognize.pyfor figuring out what characters are in a platehelpers/additional methods to help you get started (you do not have to use them, and are there for inspiration)requirements.txtif you want to use additional Python packages make sure to add them here as well.gitlab-ci.ymlGitlab pipeline file
If you want to see your score you can change the file in .gitlab-ci.yml to run on the trainingvideo.avi.
We do NOT recommend always having this uncommented because running it on the full video makes the pipeline significantly slower.
-
Python projects normally have a
requirements.txtfile with all the packages you need to install. To install the ones we currently picked for you, use:pip install -r requirements.txtFeel free to add more packages to the
requirements.txtfile, but make sure to ask your TA if you are allowed to use them! -
It is good practice to use a Virtual Environment such that you can easily switch between Python projects (projects usually have different requirements, and some of them don't work well together). Some commonly used ones are
venv(Built-in)
python -m venv myenv source myenv/bin/activate # Linux/Mac myenv\Scripts\activate # Windows- or
conda(Anaconda Prompt)
conda create --name myenv python=3.9 conda activate myenv conda install <package_name_here> pip install -r requirements.txt -
Help:
cv2 package not found!
Try installingopencv-python, sopip install opencv-python. -
Help:
ffmpeg error(even though we don't explicitly make use of ffmpeg, you might get this error when running your project because opencv uses it in the backend). Check if ffmpeg is installed withffmpeg -version, if not, install it:- Windows: Download from official website and add it to the PATH variable.
- Linux:
sudo apt install ffmpeg - Mac:
brew install ffmpeg