BlockCrime: Blockchain and Deep Learning-Based Collaborative Intelligence Framework to Detect Malicious Activities for Public Safety
Abstract
:1. Introduction
1.1. Research Motivation
- The existing state-of-the-art crime detection approaches only perform crime detection but do not alert the nearby law enforcement agencies about the detected crime [16,17,18,19,20,21,22,23,24]. Thus, there is a need for an end-to-end system that detects crime from surveillance equipment and alerts nearby law enforcement agencies with the coordinates of crime occurrence.
- Existing baseline approaches can detect only knives and no other objects of crime that suffer from the generalization problem [21,23]. For instance, if the algorithm detects only knives, it can miss out on many potential criminal activities. This is because criminal activities involve many other weapons and not only knives. Therefore, there is a requirement for an intelligent system that detects a wide array of weapons that can be used to commit a crime.
- Many existing state-of-the-art approaches use conventional computer vision and image processing algorithms [19,20,22]. However, the exceptional power of AI, such as transfer learning, has not been explored to its potential in these approaches [24]. Thus, there is a need for a technology that harnesses the power of AI and fully capitalizes it by using transfer learning.
- Motivated by this, we have explored integrating the AI model and blockchain technology to detect malicious activities in real-time and securely communicate their coordinates, enhancing public safety.
1.2. Research Contributions
- We propose an intelligent framework based on deep learning and blockchain to detect crimes and provide immediate assistance by alerting the nearest law enforcement agencies.
- To train the dataset images, a CNN-based Xception model is used, which detects whether the image is associated with a crime scene or not. The dataset is created by gathering crime images from the web and a few images are extracted from surveillance video feed systems.
- We design customized blockchain smart contracts to enhance the security and privacy of the proposed BlockCrime framework. It validates the detected crime scene’s location and securely stores it within the blockchain network.
- We then evaluate the proposed framework using performance metrics such as accuracy score, confusion matrix, F1 score, precision, and recall.
1.3. Paper Organization
2. Related Works
3. System Model and Problem Formulation
3.1. System Model
3.2. Problem Formulation
4. BlockCrime Framework
4.1. Cognitive Layer
4.2. Surveillance Layer
4.3. AI Layer
- Depth-wise separable convolutions.
- Shortcuts between convolution blocks similar to in ResNet.
- The core base model comprises the CNN-based Xception model. It contains 36 convolutional layers comprising the feature extraction basis of the network. All these layers are restricted to avoid deleting any type of information during future learning.
- On top of the base model, the following trainable layers are added:
- -
- A flatten layer which flattens the input, i.e., 4 × 4 × 2048 size input is converted into 32,768;
- -
- A dense layer consisting of 4096 neurons with ReLU activation;
- -
- Dropout layer consisting of 4096 neurons with a rate equal to 0.5;
- -
- A dense layer consisting of 4096 neurons with ReLU activation;
- -
- Dropout layer consisting of 4096 neurons with a rate equal to 0.5;
- -
- A dense layer consisting of 1 neuron with Sigmoid activation.
- These new layers, which are built on top of the existing model, transform the old characteristics into predictions on the target dataset. The proposed architecture can be seen in Figure 4.
- Except for the first and final modules, the 36 convolutional layers that comprise the Xception model are organized into 14 modules, all of which are surrounded by linear residual connections [29].
- Formally, Xception architecture is a rectilinear pile of depth-wise separable convolutional layers with residual connections.
- On top of this architecture, we added a few more layers which consist of a combination of fully linked and dropout layers. These layers use characteristics retrieved by the Xception CNN model and categorize the input into one of the target classes.
Algorithm 1 Xception to detect crime |
Initialize:
= X() while do end while = = Backpropogate and update weights & biases During testing: |
4.4. Defense Layer
4.5. Prototype Implementation
4.6. System Configuration
4.7. Dataset Description
Algorithm 2 Real-time data augmentation and pre-processing on the image data |
|
5. Results and Discussions
5.1. Experiment Setup and Simulation Analysis
5.2. Evaluation Metrics
5.2.1. Confusion Matrix
- True Positive (): Number of positive labels that are correctly classified as positive.
- False Positive (): Number of negative labels that are wrongly classified as positive.
- True Negative (): Number of negative labels that are correctly classified as negative.
- False Negative (): Number of positive labels that are wrongly classified as negative.
5.2.2. Accuracy
5.2.3. Precision
5.2.4. Recall
5.2.5. F1 Score
5.2.6. ROC Curve
5.3. Implementation of Smart Contract
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Bu, W.; Xiao, J.; Zhou, C.; Yang, M.; Peng, C. A cascade framework for masked face detection. In Proceedings of the 2017 IEEE International Conference on Cybernetics and Intelligent Systems (CIS) and IEEE Conference on Robotics, Automation and Mechatronics (RAM), Ningbo, China, 19–21 November 2017; pp. 458–462. [Google Scholar]
- Liang, Y.M.; Shih, S.W.; Shih, A.C.C. Human action segmentation and classification based on the Isomap algorithm. Multimed. Tools Appl. 2013, 62, 561–580. [Google Scholar]
- Velastin, S.A.; Boghossian, B.A.; Vicencio-Silva, M.A. A motion-based image processing system for detecting potentially dangerous situations in underground railway stations. Transp. Res. Part C Emerg. Technol. 2006, 14, 96–113. [Google Scholar]
- Nakib, M.; Khan, R.T.; Hasan, M.S.; Uddin, J. Crime scene prediction by detecting threatening objects using convolutional neural network. In Proceedings of the 2018 International Conference on Computer, Communication, Chemical, Material and Electronic Engineering (IC4ME2), Rajshahi, Kazla, Bangladesh, 8–9 February 2018; pp. 1–4. [Google Scholar]
- Crime Rate by Country 2022. Available online: https://worldpopulationreview.com/country-rankings/crime-rate-by-country (accessed on 23 July 2022).
- Kumar, R.; Kumar, P.; Tripathi, R.; Gupta, G.P.; Kumar, N.; Hassan, M.M. A Privacy-Preserving-Based Secure Framework Using Blockchain-Enabled Deep-Learning in Cooperative Intelligent Transport System. IEEE Trans. Intell. Transp. Syst. 2021, 1–12. [Google Scholar] [CrossRef]
- Kumar, P.; Kumar, R.; Kumar, A.; Franklin, A.A.; Jolfaei, A. Blockchain and Deep Learning Empowered Secure Data Sharing Framework for Softwarized UAVs. In Proceedings of the 2022 IEEE International Conference on Communications Workshops (ICC Workshops), Foshan, China, 11–13 August 2022; pp. 770–775. [Google Scholar] [CrossRef]
- Hinton, G.E.; Salakhutdinov, R.R. Reducing the dimensionality of data with neural networks. Science 2006, 313, 504–507. [Google Scholar] [PubMed]
- Ciregan, D.; Meier, U.; Schmidhuber, J. Multi-column deep neural networks for image classification. In Proceedings of the 2012 IEEE Conference on Computer Vision and Pattern Recognition, Providence, RI, USA, 16–21 June 2012; pp. 3642–3649. [Google Scholar]
- LeCun, Y.; Jackel, L.D.; Bottou, L.; Cortes, C.; Denker, J.S.; Drucker, H.; Guyon, I.; Muller, U.A.; Sackinger, E.; Simard, P.; et al. Learning algorithms for classification: A comparison on handwritten digit recognition. Neural Netw. Stat. Mech. Perspect. 1995, 261, 2. [Google Scholar]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. Adv. Neural Inf. Process. Syst. 2012, 25, 1097–1105. [Google Scholar]
- Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 1–9. [Google Scholar]
- Taigman, Y.; Yang, M.; Ranzato, M.; Wolf, L. Deepface: Closing the gap to human-level performance in face verification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 1701–1708. [Google Scholar]
- Kakkar, R.; Gupta, R.; Tanwar, S.; Rodrigues, J.J.P.C. Coalition Game and Blockchain-Based Optimal Data Pricing Scheme for Ride Sharing Beyond 5G. IEEE Syst. J. 2021, 1–10. [Google Scholar] [CrossRef]
- Verma, H.; Lotia, S.; Singh, A. Convolutional Neural Network Based Criminal Detection. In Proceedings of the 2020 IEEE Region 10 Conference (TENCON), Osaka, Japan, 16–19 November 2020; pp. 1124–1129. [Google Scholar]
- Jan, A.; Khan, G.M. Deep Vigilante: A deep learning network for real-world crime detection. J. Intell. Fuzzy Syst. 2022, 42, 1–13. [Google Scholar]
- Kumar, K.K.; Venkateswara Reddy, H. Crime activities prediction system in video surveillance by an optimized deep learning framework. Concurr. Comput. Pract. Exp. 2022, 34, e6852. [Google Scholar]
- Sivakumar, P. Real Time Crime Detection Using Deep Learning Algorithm. In Proceedings of the 2021 International Conference on System, Computation, Automation and Networking (ICSCAN), Dalian, China, 22–24 October 2021; pp. 1–5. [Google Scholar]
- Apoorva, P.; Impana, H.; Siri, S.; Varshitha, M.; Ramesh, B. Automated Criminal Identification by Face Recognition using Open Computer Vision Classifiers. In Proceedings of the 2019 3rd International Conference on Computing Methodologies and Communication (ICCMC), Erode, India, 27–29 March 2019; pp. 775–778. [Google Scholar] [CrossRef]
- Chhoriya, P. Automated criminal identification system using face detection and recognition. Int. Res. J. Eng. Technol. (IRJET) 2019, 6, 910–914. [Google Scholar]
- Olmos, R.; Tabik, S.; Herrera, F. Automatic handgun detection alarm in videos using deep learning. Neurocomputing 2018, 275, 66–72. [Google Scholar]
- Elrefaei, L.A.; Alharthi, A.; Alamoudi, H.; Almutairi, S.; Al-rammah, F. Real-time face detection and tracking on mobile phones for criminal detection. In Proceedings of the 2017 2nd International Conference on Anti-Cyber Crimes (ICACC), Abha, Saudi Arabia, 26–27 March 2017; pp. 75–80. [Google Scholar]
- Buckchash, H.; Raman, B. A robust object detector: Application to detection of visual knives. In Proceedings of the 2017 IEEE International Conference on Multimedia & Expo Workshops (ICMEW), Hong Kong, China, 10–14 July 2017; pp. 633–638. [Google Scholar]
- Lai, J.; Maples, S. Developing a real-time gun detection classifier. In Course: CS231n; Stanford University: Stanford, CA, USA, 2017. [Google Scholar]
- Dever, J.; da Vitoria Lobo, N.; Shah, M. Automatic visual recognition of armed robbery. In Proceedings of the 2002 International Conference on Pattern Recognition, Quebec City, QC, Canada, 11–15 August 2002; pp. 451–455. [Google Scholar]
- Kumari, A.; Gupta, R.; Tanwar, S.; Kumar, N. A taxonomy of blockchain-enabled softwarization for secure UAV network. Comput. Commun. 2020, 161, 304–323. [Google Scholar] [CrossRef]
- Haversine Formula to Find Distance between Two Points on a Sphere. Available online: https://www.geeksforgeeks.org/haversine-formula-to-find-distance-between-two-points-on-a-sphere/ (accessed on 9 June 2022).
- Bradski, G.; Kaehler, A. Learning OpenCV: Computer Vision with the OpenCV Library; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2008. [Google Scholar]
- Chollet, F. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1251–1258. [Google Scholar]
- Fabien, M. XCeption Model and Depthwise Separable Convolutions. Available online: https://maelfabien.github.io/deeplearning/xception/# (accessed on 15 June 2022).
- Svoboda, P.B.J.; Goldmann, T. Application for Recognition of People by Face. Adv. Neural Inf. Process. Syst. 2014, 15, 1988–1996. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Qian, N. On the momentum term in gradient descent learning algorithms. Neural Netw. 1999, 12, 145–151. [Google Scholar] [PubMed]
- Ruder, S. An overview of gradient descent optimization algorithms. arXiv 2016, arXiv:1609.04747. [Google Scholar]
- Kumari, A.; Gupta, R.; Tanwar, S. Amalgamation of blockchain and IoT for smart cities underlying 6G communication: A comprehensive review. Comput. Commun. 2021, 172, 102–118. [Google Scholar] [CrossRef]
- Sokolova, M.; Japkowicz, N.; Szpakowicz, S. Beyond accuracy, F-score and ROC: A family of discriminant measures for performance evaluation. In Australasian Joint Conference on Artificial Intelligence; Springer: Berlin/Heidelberg, Germany, 2006; pp. 1015–1021. [Google Scholar]
- Tharwat, A. Classification Assessment Methods: A detailed tutorial. Appl. Comput. Inform. 2018, 1–13. [Google Scholar] [CrossRef]
- Kumar, P.; Gupta, G.P.; Tripathi, R.; Garg, S.; Hassan, M.M. DLTIF: Deep Learning-Driven Cyber Threat Intelligence Modeling and Identification Framework in IoT-Enabled Maritime Transportation Systems. IEEE Trans. Intell. Transp. Syst. 2021, 1–10. [Google Scholar] [CrossRef]
- Jadav, N.K.; Gupta, R.; Alshehri, M.D.; Mankodiya, H.; Tanwar, S.; Kumar, N. Deep Learning and Onion Routing-based Collaborative Intelligence Framework for Smart Homes underlying 6G Networks. IEEE Trans. Netw. Serv. Manag. 2022, 1. [Google Scholar] [CrossRef]
- Muhammad, Y.; Alshehri, M.D.; Alenazy, W.M.; Hoang, V.T.; Alturki, R. Identification of Pneumonia Disease Applying an Intelligent Computational Framework Based on Deep Learning and Machine Learning Techniques. Mob. Inf. Syst. 2021, 2021, 9989237:1–9989237:20. [Google Scholar] [CrossRef]
- Yu, J.; Wang, Z.; Vasudevan, V.; Yeung, L.; Seyedhosseini, M.; Wu, Y. Coca: Contrastive captioners are image-text foundation models. arXiv 2022, arXiv:2205.01917. [Google Scholar]
- Wortsman, M.; Ilharco, G.; Gadre, S.Y.; Roelofs, R.; Gontijo-Lopes, R.; Morcos, A.S.; Namkoong, H.; Farhadi, A.; Carmon, Y.; Kornblith, S.; et al. Model soups: Averaging weights of multiple fine-tuned models improves accuracy without increasing inference time. In Proceedings of the International Conference on Machine Learning, PMLR, Paris, France, 29–30 April 2022; pp. 23965–23998. [Google Scholar]
- Dai, Z.; Liu, H.; Le, Q.V.; Tan, M. Coatnet: Marrying convolution and attention for all data sizes. Adv. Neural Inf. Process. Syst. 2021, 34, 3965–3977. [Google Scholar]
Author | Year | Objective | Pros | Cons |
---|---|---|---|---|
Proposed work | 2022 | Detect crime using surveillance camera feeds and notify local law enforcement authorities of the crime scene utilizing blockchain’s security. | For crime detection, uses state-of-the-art CNN architecture with transfer learning and issues the coordinates of the crime location through blockchain, assuring no manipulation and increased security. | - |
Jan et al. [16] | 2022 | Identification of assault, fighting, shooting, and vandalism from video sequence using deep 2D and 3D CNN. | The 2D CNN, even with lesser parameters, achieved a promising classification accuracy of 91.2%. The system also reduces false alarm rate. | The system does not mention how to alert the authority on detecting crime. |
Kumar et al. [17] | 2022 | Identify criminals by their activities and handling tools | Proposes a novel lion-based deep belief neural paradigm | The only purpose is to detect and not what to do with the detected results. |
Sivakumar et al. [18] | 2021 | Monitor real-time video and notify the local cyber-crime Admin of the crime’s incidence and location. | Extremely fast architecture that can process image in real-time at 45 fps. | Trained on a dataset created using high-res images. No results regarding performance on low-res images which will be the more common scenario. |
Apoorva et al. [19] | 2019 | malicious identification by face recognition in real-time using an automated surveillance cameras. | Can recognize more than one face robustly in real-time environment. | Not capable of identifying potential malicious people by detecting objects of crime such as knife, gun, etc. |
Chhoriya et al. [20] | 2019 | Identify and distinguish malicious people’s faces in a real-time video feed collected from a camera. | Makes use of location and scale invariant detector and efficient selection of features. | Can just identify malicious people whose facial data are present in the database and cannot spot potential malicious people. |
Olmos et al. [21] | 2018 | Detect Guns as a signal of crime. | Detects crime even in low-quality video. | Algorithm can only detect guns and no other object of crime, such as knives. |
Elrefaei et al. [22] | 2017 | Recognize the face of a malicious person or a suspect. | Makes use of the Viola–Jones algorithm that is not affected by illuminations. Designed to work on low hardware device such as android smart phones. | Does not experiment Optical Flow with CAM Shift algorithm which can handle fast and large movements, hence, improving overall accuracy. |
Buckchash et al. [23] | 2017 | Their proposed approach can detect knives in video feed. | Knife detection at all position and different scales. | Can only detect knives for malicious activity. |
Lai et al. [24] | 2017 | Detecting firearms and classifying them. | Used Tensor Flow based Overfeat network. | Did not focus on transfer learning techniques. |
Parameters | Values |
---|---|
Wireless network layer parameters | |
Frequency range | 28 GHz |
Channel bandwidth | 110 MHz |
Subcarrier spacing | 30 KHz |
Modultation | OFDMA |
Channel coding | Linear coding |
Fading channel | Rayleigh Channel |
AI layer parameters | |
Epochs | 10 |
Batch size | 32 |
Optimizer | Adam |
Loss function | Binary Cross Entropy |
0.001 | |
0.9 | |
0.999 | |
Defense layer parameters | |
Solidity compiler | v0.8.7 |
Remix IDE | v0.21.4 |
Gas limit | 3,000,000 |
Architecture | Train Accuracy | Test Accuracy | Precision | Recall | F1 Score | AUC |
---|---|---|---|---|---|---|
LeNet | 91.01 | 88.00 | 81.69 | 89.23 | 85.29 | 77.10 |
ResNet50 | 62.48 | 66.00 | 66.00 | 100.00 | 79.52 | 74.95 |
ResNet101 | 68.63 | 71.00 | 80.33 | 74.24 | 77.17 | 74.78 |
ResNet152 | 67.80 | 73.00 | 73.56 | 94.12 | 82.57 | 73.94 |
ResNet50 V2 | 95.42 | 86.00 | 84.62 | 97.06 | 90.41 | 82.95 |
VGG16 | 92.65 | 80.00 | 81.08 | 90.91 | 85.71 | 86.00 |
VGG19 | 87.58 | 78.00 | 76.54 | 95.38 | 84.93 | 91.87 |
Xception | 96.57 | 90.00 | 90.00 | 95.45 | 92.64 | 91.84 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Patel, D.; Sanghvi, H.; Jadav, N.K.; Gupta, R.; Tanwar, S.; Florea, B.C.; Taralunga, D.D.; Altameem, A.; Altameem, T.; Sharma, R. BlockCrime: Blockchain and Deep Learning-Based Collaborative Intelligence Framework to Detect Malicious Activities for Public Safety. Mathematics 2022, 10, 3195. https://doi.org/10.3390/math10173195
Patel D, Sanghvi H, Jadav NK, Gupta R, Tanwar S, Florea BC, Taralunga DD, Altameem A, Altameem T, Sharma R. BlockCrime: Blockchain and Deep Learning-Based Collaborative Intelligence Framework to Detect Malicious Activities for Public Safety. Mathematics. 2022; 10(17):3195. https://doi.org/10.3390/math10173195
Chicago/Turabian StylePatel, Dev, Harshil Sanghvi, Nilesh Kumar Jadav, Rajesh Gupta, Sudeep Tanwar, Bogdan Cristian Florea, Dragos Daniel Taralunga, Ahmed Altameem, Torki Altameem, and Ravi Sharma. 2022. "BlockCrime: Blockchain and Deep Learning-Based Collaborative Intelligence Framework to Detect Malicious Activities for Public Safety" Mathematics 10, no. 17: 3195. https://doi.org/10.3390/math10173195
APA StylePatel, D., Sanghvi, H., Jadav, N. K., Gupta, R., Tanwar, S., Florea, B. C., Taralunga, D. D., Altameem, A., Altameem, T., & Sharma, R. (2022). BlockCrime: Blockchain and Deep Learning-Based Collaborative Intelligence Framework to Detect Malicious Activities for Public Safety. Mathematics, 10(17), 3195. https://doi.org/10.3390/math10173195