/Chess-Piece-Detector-using-Tensorflow-2.x

Detecting chess pieces using Tensorflow 2.x end to end project.

Primary LanguageJupyter Notebook

Chess Piece Detector

This is an end to end Chess Pieces Object detection Project where the pieces in the chess are identified as pawn, king, knight etc.

About the Datatset

I have collected this dataset from Roboflow. The dataset is of Chess board photos and various pieces. 
All photos were captured from a constant angle, a tripod to the left of the board. The bounding boxes of 
all pieces are annotated as follows: white-king, white-queen, white-bishop, white-knight, white-rook, 
white-pawn, black-king, black-queen, black-bishop, black-knight, black-rook, black-pawn. 
There are 2894 labels across 292 images. 

Link to dataset - Click Here

For Running the Project:

I have used Tensorflow 2.x for object detection. 
Kindly visit the official reporsitory for tensorflow and download the models folder for running the project 
you just need few folders from the reserch folders copy those and keep them in the extracted folder for this
repository. Your directory should be loooking like below image.

Capture

Now for downloading the custom model trained kindly visit the below link and download the custom model trained 
and then paste that folder in same directory. 

Link to custom trained my_model folder - Click Here

> Open the project in Pychram or VS code 

> Create a new Conda environemnt 
- File > Settings > Python Interpretor > Add > #### Results:Create new conda environment

> Activate the enviironment in terminal conda activate "ENV_NAME" 

> Run : pip install - requirements.txt

> Run the project find it on http://127.0.0.1:8000/

> Kindly use some of the images in sample images folder for testing it or you can see the SS below.

Results:

This is how your web application will look. Just cick on upload and upload the image from sample images folder 
and click on predict to see the results. 

Step 1 : Click on Upload and choose the image.

Screenshot (302)

Step 2 : Now Click on Predict to perform the object detection using the custom model created.

Screenshot (303)

Step :3 Your Results will be shown lik ebelow. It will also be saved in the saem older in your directory.

Screenshot (304)