Determine bullet holes from firing target paper which will in return help to determine the MPI and zero any weapon(weapon correction).
- Install python along with pip.
- Download the batch file and execute it to install all the dependencies required.
- Data Collection(Images of Target Paper)
- If necessary you change the image resolution using transform_image_resolution.py
- Separate 80% of the images to train folder and 20% of the images to test folder.
- Label Bullet holes from target paper images(train folder images) using LabelImg and assign class.
- Labeling the images will generate .xml file for each image. We need to convert all these .xml files to .csv files executing xml_to_csv.bat
- Convert .csv file to .record file executing generate_tfrecords.bat
- Finally need to train the model by executing traincmd.bat file. The user can change the number of steps while training in faster_rcnn_inception_v2_pets.config file at line 113.
- About every 5 minutes the current loss gets logged to Tensorboard. We can open Tensorboard by executing open_tensorboard.bat file which will open a webpage at localhost:6006 and display the losses while training. You should train the model until it reaches a satisfying loss. The training process can then be terminated by pressing Ctrl+C.
- Now that we have a trained model we need to generate an inference graph, which can be used to run the model. For doing so we need to first of find out the highest saved step number. For this, we need to navigate to the training directory and look for the model.ckpt file with the biggest index. Now need to execute inf_graph_gen.bat file which will generate frozen_inference_graph.pb model at inference_graph folder and finally it will detect bullet holes from target image.