Boarding Pass OCR


This article walks you through the building process of an OCR API that extracts data from Flight Boarding Passes using our deep learning engine. It will work for any airline company or boarding pass template. 




  1. You’ll need a free account. Sign up and confirm your email to login.
  2. You’ll need at least 20 Boarding Pass images or PDFs to train your OCR.



Define your Boarding Pass use case


First, we’re going to define the fields we'd like to extract from a Boarding Pass. 



Boarding Pass OCR API

  • Passenger name: The full name of the travelling passenger (John Doe)


  • Flight number: The flight number for the boarding pass, including the airline's identification letters (AC 2505)


  • Date: The date of departure in US format (10/12/2017)


  • Departure airport: The airport of departure including the airport identification letters (New Delhi DEL)


  • Destination airport: The airport of destination including the airport identification letters (Los Angeles LAX)


  • Boarding Time: The boarding time (07:45)



That’s it for our use case. Feel free to add any other relevant data to fit your requirements.



Deploy your API


Once you have defined the list of fields you want to extract, head over to the platform and press the ‘create a new API’ button.


You now land on the API setup page. Here is the image you can use to set up the API - for example, my setup looks as follows:



Set up your Boarding Pass OCR API


Once you’re ready, press the “next” button, and let's specify the data types for each of the fields we want our API to extract.


To move forward with your model creation, you can download this json config to set up your data model or do it manually.



boarding pass ocr



Passenger name: type String that never contains numeric characters.


Passenger Name field for Boarding Pass OCR




Flight number: type String without specifications. 


Flight Number field for Boarding Pass OCR



Date: type Date with US format order.


Date field for Boarding Pass OCR



Departure airport: type String that never contains numeric characters.


Departure airport field for Boarding Pass OCR



Destination airport: type String that never contains numeric characters.


Destination airport field for Boarding Pass OCR



Boarding Time: type String that never contains alpha characters


Boarding time field for boarding pass OCR



Once you’re done setting up your data model, press the Start training your model button at the bottom of the screen.



Boarding pass ocr training




Train your Boarding Pass OCR model



Deep learning Boarding Pass OCR




Now is the time to train your Boarding Pass deep learning model in the Training section of your API. 



In a few hours (minutes if you're expeditious), you’ll get your first model trained and will be able to use your custom OCR API for parsing Boarding Passes in your application.


To get more information about the training phase, please refer to the Getting Started tutorial.

If you have any questions regarding your use case, feel free to reach out on the chat!