Performing semantic segmentation on ID cards using U-Net implemented in Tensorflow 2.10.0
Run python example.py -i <path-to-image> -o <path-to-output-file>
to generate a segmented ID card image.
See example.py
for more details.
See the U-Net Semantic Segmentation notebook for comprehensive details regarding model implementation, training, inference and a complete pipeline example.
You can use the pre-trained model best_model.h5
. This model achieved 96.5% mean IoU on the test set.
-
Github: ML_IDCard_Segmentation-TF-Keras
-
Dataset: MIDV-500
-
Perspective transformation from How to Build a Kick-Ass Mobile Document Scanner by PyimageSearch
-
Github: Imutils