Personal-Data-Identification
CNN to segregate credit card data from non personal image. The New Model contains jupyter notebook file of the trained model using the dataset uploaded in the box. Predict contains the prediction code for inference.
-
Installation and prerequisite : Anaconda with Python 3.6, Tensorflow 1.9, Keras (Deep learning library). You might need to install matplotlib and numpy separately using anaconda. You will need jupyter notebook to run the training program which comes as a part of anaconda.
-
Instruction on how to run your training program : Refer to New Model.ipynb
-
Make a folder structure as follows: Split the available data in 80 - training 20 - validation ratio and place in the below folders a) dataset/train/non personal/Put_All_Training_Non_Personal_Images.jpg b) dataset/train/personal/Put_All_Training_Personal_Images.jpg c) dataset/validation/non personal/Put_All_Non_Validation_Personal_Images.jpg d) dataset/validation/personal/Put_All_Personal_Validation_Images.jpg
-
Replace the paths in cell 22 of my github notebook with the above created folder paths
-
Please follow the comments in the notebook for rest of the configurations and run the cells 22 to 26 as it is in case there is no tuning in model required.
-
The new_weight.h5 in cell 26 and model.json in cell 14 represent the path where you want to save the model and the weight. If not changed these will get saved in the folder where anaconda is installed.
-
Instruction on how to run the inference : Refer to Predict.ipynb
-
Convert cell 115 to a python program.
-
Replace model.json with the path where you model is saved from the previous steps.
-
Replace new_weight.h5 with the path where your weights are saved from the previous steps.
-
Replace C:/Users/IBM_ADMIN/Downloads/samplecard/ssn_images/only_cards_images with your mixed data folder path. This lists all the images in that folder.
-
Replace C:/Users/IBM_ADMIN/Downloads/samplecard/ssn_images/images/ with your mixed data folder path. This iteratively runs through every image listed in the previous step.
-
Replace C:/Users/IBM_ADMIN/Desktop/credit card/ with the folder where you want to place personal data
-
Replace C:/Users/IBM_ADMIN/Desktop/non pi/ with the folder where you want to place non personal data
-
Run the python script/program