App Building
Google Drive- store images & data
Spreadsheet- store written data (also in G-Drive)
AppSheet- build user interface & train OCR model
Spreadsheet
We categorize our data by manually inputting the car plate values of the images.
App Sheet
Then we sync the images on our G-drive and the data in our Spreadsheet to train our OCR model to recognize which patterns it should recognize.
Bounding Box
Manually creating bounding car plates in boxes from a big picture so AI can learn which area to focus on
Images given to us for manual boxing
zip_file_path = "/tmp/image.zip"
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
zip_ref.extractall("/content/drive/MyDrive/APP/car_plate_box")
Uploads images of rear-end of cars to our G-drive
Coordinates of bounding boxes of our images.
weights_url = "https://storage.googleapis.com/mledu-datasets/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5"
weights_file = "inception_v3.h5"
Using pretrained model for our weights as it is more precise.
x = layers.Flatten()(last_output)
x = layers.Dense(512, activation='relu')(x)
final = layers.Dropout(0.2)(x)
a = layers.Dense(1, name="a")(final)
b = layers.Dense(1, name="b")(final)
c = layers.Dense(1, name="c")(final)
d = layers.Dense(1, name="d")(final)
Training our own model for the last layer. abcd being the 4 corners of the bounding box.
Using LabelImg to annotate bounding boxes as the input to our model so our AI model knows which part of the image needs to be boxed.
The xml file for the bounding boxes we created. Blue highlights the corners of our bounding boxes.
We test our AI model with this image. It successfully creates a bounding box for our Car Plate.
[95, 123, 191, 163]
Above is the coordinates of our bounding box which we crop. Now we can scan the car plate value. As well as upload to the Car Plate App to scan for its value.
App Preview
Best used for parking lots to calculate fee of duration of stay of vehicles.
Scanning
Scan Car Plate number and letters
Save enter time
Calculating
Prompts us to enter our car plate value
Finds our car plate and our enter time
Sets our exit time
Calculate time of stay
Show fee by period of stay