In the previous blog, we discussed the EAST algorithm, its architecture and its usage. In this blog, we will see how to implement the EAST using its GitHub Repository We will do this implementation in a Linux system.
Clone the Repository
First, you need to clone its GitHub repository on your system and change your directory to the EAST folder by using the following command.
1 2 |
git clone https://github.com/argman/EAST.git cd EAST/ |
Download Pretrained Checkpoints
Now to test this EAST model, you first need to download the pretrained checkpoints trained on ICDAR 2013 and ICDAR 2015 dataset. You can download the checkpoints from the following link:
Test the Model
After downloading pretrained checkpoints and cloning the GitHub repository, you are ready to test the model using the following command:
1 2 |
python eval.py --test_data_path=./tmp/images/ checkpoint_path=./tmp/east_icdar2015_resnet_v1_50_rbox/ \ --output_dir=./tmp/ |
In the above command, you need to specify some directory paths. First, you need to specify your test image dataset path as a “test_data_path” argument. Second, you need to specify your recently downloaded checkpoints path as a “checkpoint_path” argument. And lastly, you need to specify your output directory path as an “output_dir” argument.
Sometimes you may end up with common adaptor and lanms error as shown in the following figure.
To solve these errors, you just need to use the following links or you can just google them.
Running EAST using WEB
We can also run a demo by using the run_demo_server.py file provided by the GitHub repository. We just need to run the following command:
1 |
python run_demo_server.py --checkpoint_path=./tmp/east_icdar2015_resnet_v1_50_rbox/ |
As you can see demo server is running on default port number 8769. Now you just need to open your web browser and submit the following URL:
Then upload the image and click on the submit button. After processing, you will see the results something like this.
Hope you enjoy reading.
If you have any doubt/suggestion please feel free to ask and I will do my best to help or improve myself. Good-bye until next time.
Referenced GitHub Repository: EAST: An Efficient and Accurate Scene Text Detector