Arabic Car License Recognition. A solution to the kaggle competition Machathon 3.0.

Overview

Transformers

Arabic licence plate recognition 🚗

  • Solution to the kaggle competition Machathon 3.0.
  • Ranked in the top 6️⃣ at the final evaluation phase.
  • Check our solution now on collab!
  • Check the solution presentation

Preprocessing Pipeline

The schematic of the processor

Approach

Step1: Preprocessing Enhancments on the image.

  • Most images had bad illumination and noise
    • Morphological operations to Maximize Contrast.
    • Gaussian Blur to remove Noise.
  • Thresholding on both Value and Saturation channels.

Step2: Extracting white plate using countours.

  • Get countours and sort based on Area.
  • Polygon Approximation For noisy countours.
  • Convex hull for Concave polygons.
  • 4-Point transformation For difficult camera angles.

Now have numbers in a countor and letters in another.

Step3: Separating characters from white plate using sliding windows.

Can't use countours to get symbols in white plate since Arabic Letter may consist of multiple charachters e.g ت this may consist of 2/3 countours.

Solution

  • Tuned 2 sliding windows, one for letters' white plate, the other for numbers.
    • Variable window width
    • Window height is the white plate height, since arabic characters may consist multiple parts
  • Selecting which window
    • Must have no black pixels on the sides
    • Must have a specific range of black pixels inside
    • For each group of windows the one with max black pixels is selected

Step4: Character Recognition.

  • Training 2 model since Arabic letters and numbers are similar e.g (أ,1) (5, ه)
    • one for classifing only arabic letters.
    • one for classifying arabic numbers.

Project Organization

Scripts applied on images

./Macathon/code/
├── extract_bbx_xml.ipynb                       : Takes directory of images and their bbx data stored in an xml files, and crop the bbxs from the images.
|                                                 The xml file contains licence label(name), xmin, ymin, xmax, ymax of the bbxs in an image.    
├── extract_bbx_txt.ipynb                       : Takes directory of images and their bbx data stored in a txt files, and crop the bbxs from the images.
|                                                 The txt file corresponding to one image may consist of multiple bbxs, each corresponds to a row of xmin,ymin,xmax,ymax for that bbx.
└── crop_right_noise.ipynb                      : Crops an image with some percentage and replace with the cropped image. 

Model versions

./Macathon/code/
└── model.ipynb                      : - The preprocessing and modeling stage, Contains:
                                          - Preprocessing Functions
                                          - Training both classifers
                                          - Prediction and generating the output csv file

Data Folder

./Macathon/data/
├── challenging_images.rar                      : Contains most challenging images collected from the train data. 
├── cropped_letters.zip                         : 28 Subfolders corresponding to the 28 letter in Arabic alphabet.
|                                                 Each subfolder holds images for the letter it's named after, cropped from the train data distribution.
├── cropped_numbers.zip                         : 10 Subfolders for the 10 numbers.
|                                                 Each subfolder holds images for the number it's named after, cropped from the train data distribution.
├── machathon-3.zip                             : The uploaded data found with the kaggle competition.
└── testLetters.zip                             : 200 images labeled from the test data distribution.
                                                  Each image has a corresponding xml file holding the bbxs locations in it.

Contributors

This masterpiece was designed, and implemented by

Hossam
Hossam Saeed
Mostafa wael
Mostafa Wael
Nada Elmasry
Nada Elmasry
Noran Hany
Noran Hany
Owner
Noran Hany
Noran Hany
A large dataset of 100k Google Satellite and matching Map images, resembling pix2pix's Google Maps dataset.

Larger Google Sat2Map dataset This dataset extends the aerial ⟷ Maps dataset used in pix2pix (Isola et al., CVPR17). The provide script download_sat2m

34 Dec 28, 2022
Code for Deep Single-image Portrait Image Relighting

Deep Single-Image Portrait Relighting [Project Page] Hao Zhou, Sunil Hadap, Kalyan Sunkavalli, David W. Jacobs. In ICCV, 2019 Overview Test script for

438 Jan 05, 2023
Remote sensing change detection tool based on PaddlePaddle

PdRSCD PdRSCD(PaddlePaddle Remote Sensing Change Detection)是一个基于飞桨PaddlePaddle的遥感变化检测的项目,pypi包名为ppcd。目前0.2版本,最新支持图像列表输入的训练和预测,如多期影像、多源影像甚至多期多源影像。可以快速完

38 Aug 31, 2022
Code for WSDM 2022 paper, Contrastive Learning for Representation Degeneration Problem in Sequential Recommendation.

DuoRec Code for WSDM 2022 paper, Contrastive Learning for Representation Degeneration Problem in Sequential Recommendation. Usage Download datasets fr

Qrh 46 Dec 19, 2022
Python based framework for Automatic AI for Regression and Classification over numerical data.

Python based framework for Automatic AI for Regression and Classification over numerical data. Performs model search, hyper-parameter tuning, and high-quality Jupyter Notebook code generation.

BlobCity, Inc 141 Dec 21, 2022
Code release of paper Improving neural implicit surfaces geometry with patch warping

NeuralWarp: Improving neural implicit surfaces geometry with patch warping Project page | Paper Code release of paper Improving neural implicit surfac

François Darmon 167 Dec 30, 2022
Semantic Segmentation Suite in TensorFlow

Semantic Segmentation Suite in TensorFlow. Implement, train, and test new Semantic Segmentation models easily!

George Seif 2.5k Jan 06, 2023
A Shading-Guided Generative Implicit Model for Shape-Accurate 3D-Aware Image Synthesis

A Shading-Guided Generative Implicit Model for Shape-Accurate 3D-Aware Image Synthesis Figure: Shape-Accurate 3D-Aware Image Synthesis. A Shading-Guid

Xingang Pan 115 Dec 18, 2022
Supplemental Code for "ImpressionNet :A Multi view Approach to Predict Socio Facial Impressions"

Supplemental Code for "ImpressionNet :A Multi view Approach to Predict Socio Facial Impressions" Environment requirement This code is based on Python

Rohan Kumar Gupta 1 Dec 19, 2021
[ACMMM 2021 Oral] Enhanced Invertible Encoding for Learned Image Compression

InvCompress Official Pytorch Implementation for "Enhanced Invertible Encoding for Learned Image Compression", ACMMM 2021 (Oral) Figure: Our framework

96 Nov 30, 2022
Dynamic hair modeling from monocular videos using deep neural networks

Dynamic Hair Modeling The source code of the networks for our paper "Dynamic hair modeling from monocular videos using deep neural networks" (SIGGRAPH

53 Oct 18, 2022
Haze Removal can remove slight to extreme cases of haze affecting an image

Haze Removal can remove slight to extreme cases of haze affecting an image. Its most typical use is for landscape photography where the haze causes low contrast and low saturation, but it can also be

Grace Ugochi Nneji 3 Feb 15, 2022
An self sufficient AI that crawls the web to learn how to generate art from keywords

Roxx-IO - The Smart Artist AI! TO DO / IDEAS Implement Web-Scraping Functionality Figure out a less annoying (and an off button for it) text to speech

Tatz 5 Mar 21, 2022
This repository contains the official code of the paper Equivariant Subgraph Aggregation Networks (ICLR 2022)

Equivariant Subgraph Aggregation Networks (ESAN) This repository contains the official code of the paper Equivariant Subgraph Aggregation Networks (IC

Beatrice Bevilacqua 59 Dec 13, 2022
Explaining Deep Neural Networks - A comparison of different CAM methods based on an insect data set

Explaining Deep Neural Networks - A comparison of different CAM methods based on an insect data set This is the repository for the Deep Learning proje

Robert Krug 3 Feb 06, 2022
YOLO-v5 기반 단안 카메라의 영상을 활용해 차간 거리를 일정하게 유지하며 주행하는 Adaptive Cruise Control 기능 구현

자율 주행차의 영상 기반 차간거리 유지 개발 Table of Contents 프로젝트 소개 주요 기능 시스템 구조 디렉토리 구조 결과 실행 방법 참조 팀원 프로젝트 소개 YOLO-v5 기반으로 단안 카메라의 영상을 활용해 차간 거리를 일정하게 유지하며 주행하는 Adap

14 Jun 29, 2022
Sequence-tagging using deep learning

Classification using Deep Learning Requirements PyTorch version = 1.9.1+cu111 Python version = 3.8.10 PyTorch-Lightning version = 1.4.9 Huggingface

Vineet Kumar 2 Dec 20, 2022
GNPy: Optical Route Planning and DWDM Network Optimization

GNPy is an open-source, community-developed library for building route planning and optimization tools in real-world mesh optical networks

Telecom Infra Project 140 Dec 19, 2022
PyDeepFakeDet is an integrated and scalable tool for Deepfake detection.

PyDeepFakeDet An integrated and scalable library for Deepfake detection research. Introduction PyDeepFakeDet is an integrated and scalable Deepfake de

Junke, Wang 49 Dec 11, 2022
This repository contains code from the paper "TTS-GAN: A Transformer-based Time-Series Generative Adversarial Network"

TTS-GAN: A Transformer-based Time-Series Generative Adversarial Network This repository contains code from the paper "TTS-GAN: A Transformer-based Tim

Intelligent Multimodal Computing and Sensing Laboratory (IMICS Lab) - Texas State University 108 Dec 29, 2022