DEEP LEARNING SMALL ARMS RECOGNITION: DEVELOPMENT OF A BASIC MODEL AND PROSPECTS FOR ITS USE IN THE FIELD OF CONVENTIONAL DISARMAMENT Theò Bajon, Associate Researcher, United Nations Institute for Disarmament Research (UNIDIR) Abstract The automated detection, recognition, and identification of small arms through deep learning tools is a recent process that seems to offer interesting possibilities in the field of conventional disarmament. As the field of research has so far mainly focused on detection models in the context of domestic security, it is interesting to explore, in this paper, the development of a basic small arms recognition model and its potential use in the field of conventional disarmament; this paper lays the foundations of a basic small arms recognition model through its development using deep learning tools and its experimental testing. The initial results of the basic model developed in this paper put in perspective the foundations for improvement towards a developed recognition model and towards a complex identification model of small arms. Moreover, this paper also puts in perspective the potential of such models in the field of conventional disarmament. Introduction For some years now, the field of artificial intelligence and particularly machine learning has played an increasingly important role in the processes of detection, recognition, and identification of various objects through what can be referred to as object examination (Gasparetti et al., 2018). This interest has materialised in many areas, notably in the detection of small arms in security contexts, and more recently, in the field of forensics (Carriquiry et al., 2019). Beyond these premises, it is interesting to approach the question of machine learning, specifically deep learning, in terms of detection, recognition, and identification of small arms. This can be done for various purposes: to test the possibility of developing such models, making it possible to recognise different categories of small arms; and, possibly, to determine with precision the exact small arms model. Thus, this paper seeks to implement a basic model of small arms recognition through deep learning to test the effectiveness of the model, while exploring the possibility of using such models in the field of conventional disarmament. Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 2 To this end, the first section of this paper provides a literature review of the use of such techniques in the field of conventional weapons through a theory of detection, recognition, and identification, as well as a categorisation of small arms within the basic small arms recognition model. Subsequently, the second section focuses on the methodological process of the basic small arms recognition model through the theoretical framework of the deep learning methodology employed, as well as the establishment of a methodological and experimental protocol of this basic model. The next section presents the efficiency results of the model, while exploring potential improvements towards the development of this same model. Finally, the last section explores the potential use of such a model in the field of conventional disarmament, while providing the foundations for the development of a complex small arms identification model. Theoretical framework and literature review Putting into perspective the processes of detection, recognition, and identification of small arms through the use of machine learning, as well as existing work in the subject, provides a perspective on the interest of this research in the current field of study. By focusing on a recognition model, this paper thus moves away from the classical pattern of existing models in the literature that usually focus, almost exclusively, on detection. Focus on the recognition of small arms and its potential use in the field of conventional arms control also enables the theorisation of a strict categorisation of small arm types employed in the basic deep learning small arms recognition model. Theory of detection, recognition, and identification of small arms In recent years, the implementation of artificial intelligence processes through machine learning in the field of small arms and light weapons has greatly developed, particularly in the detection of these weapons for domestic security purposes (Olmos et al., 2017). While detection is an important component of these machine learning processes related to the small arms domain, it is important to explore other types of processes and the potential literature that accompanies them, which allows to understand the added value of exploring the model developed in this paper, as well as the perspectives of use that may emerge in the small arms control domain. Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 3 Detection, recognition, and identification, as conceptualised in this paper, are the three main components of object examination (Fig. 1). Figure 1 Framework for object detection, recognition, and identification Detection is the act of determining whether an object is present or not, and thus identifying the presence of a specific type of object in relation to another type of object or the non-presence of an object. In this paper, this translates to identifying whether we are in the presence of a small arm or not (e.g., differentiating a weapon of some category from an umbrella) (Kanehisa & Neto, 2019). The greatest challenge with this component is differentiating between a real weapon and a replica. Currently, this type of component is the most developed, as well as the one on which the literature has largely focused in recent years; it is mostly materialised by video image analysis, especially from closed-circuit television (CCTV) or scanners to automatically detect the presence or absence of a small arm (Narejo et al., 2021). Recognition is the act of determining the category of an object within a specific object type. In this paper, this means identifying which category of small arms we are dealing with, distinguishing, for example, an assault weapon from a handgun (Xu & Hung, 2020). This component of object examination is at the heart of the study and the basis of the basic model developed; the main difficulties lie in the visual similarities that can exist between certain weapons from different categories, which can distort the machine learning models in this area (Sislin, 1998). Identification is the precise determination of the type of an object, that is, its precise characteristics. In this paper, this means, for example, identifying the specific model of the weapon and, potentially, its calibre (Jenzen-Jones & Schroeder, 2018). This component of the advanced object examination is quite Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 4 interesting as it provides a great deal of detail on the object itself, although there are several technical and practical difficulties. The last section of this paper discusses and highlights several aspects of such difficulties. The similarities between certain models can thus lead to the creation of object families, such as grouping different weapon models, to facilitate the task under certain conditions. By choosing to focus on the recognition of small arms, it is important to determine the different categories that will compose the recognition model. Small arms categorisation Drawing on current categorisations in the field of small arms and light weapons, in particular, the UN Register of Conventional Arms (Abramson, 2008), and the Jane’s Weapons: Infantry Yearbook 20/21, it is possible to define a proper categorisation to create the basic small arms recognition model presented in this paper (Fig. 2). Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 5 Figure 2 Small arms categorisation The handgun category includes all short-barrelled firearms that can be held and used with one hand, known as handguns; this category mainly includes revolvers and semi-automatic pistols (Hosley, 1999). The sub-machine gun category includes all small scale automatic firearms designed to fire, primarily ,handgun ammunition (Hogg, 2000). The shotgun category includes all long-barrelled firearms designed to fire shotshells (Cutshaw, 2006). The rifle category includes all long-barrelled firearms designed for precision shooting (Rose, 2009). The assault rifle category includes all medium-sized selective-fire firearms that use intermediate ammunition (Popenker & Williams, 2004). The machine gun category includes all long-barrelled direct-fire firearms that use full-power ammunition (Willbanks, 2004). Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 6 The categories used for this model have specific technical characteristics, which offer specific visual characteristics; however, it is sometimes difficult to establish real technical and visual differences for some models (United Nations Office on Drugs and Crime, n.d.). Methodology of the basic small arms recognition model Within the theoretical framework of training and inference of deep neural networks, the basic small arms recognition model implements a methodology and an experimental test protocol to determine the success of such a model in the recognition of small arms. Theoretical framework for machine learning of the basic small arms recognition model Through the use of neural networks and deep learning, the model is integrated into the logic of automated learning on the basis of a database that is pre- processed (Wang, 2016). To materialise the neural network process through deep learning applied to the basic model, the process was conceptualised in a simplified way (Fig. 3). Figure 3 Simplified visualization of how neural networks work in the basic small arms recognition model Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 7 The idea is to have a large database from which the neural networks can be trained through a deep learning algorithm. On the theoretical basis, the larger and more diverse the database, the better the model will be able to recognise and categorise with precision the objects that will subsequently be submitted to it (Eitel et al., 2015). Thus, when an input is submitted to the model, it will make several connections through its neural networks in order to make internal comparisons and probabilities on the recognition of the category of the object (Ba et al., 2015). The basic deep learning neural network model consists of a database of about 2,316 photos of 775 weapons of different categories and eras. The selected basis database consists of 356 photos of 121 different assault rifles, 692 photos of 232 different handguns, 306 photos of 97 different machine guns, 361 photos of 119 rifles, 198 photos of 67 different shotguns, and 403 photos of 139 different sub- machine guns. Experimental protocol for the basic small arms recognition model In order to properly test the basic small arms recognition model that has been established and trained on the database described above, it is essential to establish a concrete methodological protocol. For this purpose, it was decided to test each of the categories of the model, with inputs from small arms models contained in the model database but different pictures from inputs already present in the model database, as well as with small arms models not present in the model. For each category, 10 different tests were performed, 5 with models present in the database and 5 with models not initially present in the database. In addition to the 60 tests t(x) carried out, 10 additional tests were carried out with fantasy inputs, including toys or small arms from science fiction to see what results the basic model could give. The basic model thus makes it possible to visualise the results in the form of output broken down into the different categories of the model (Fig. 4). Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 8 Figure 4 Example of an output following an input in the basic small arms recognition model The percentage visualisation of the output provides a classification that the basic model makes through the object recognition process. To determine the success s(x) of each test t(x), the focus was on the actual category to which the small arms input belonged to, as well as the percentage of small arms determined to belong to that category by the basic model. Results, prospects for improvement, and prospects for use Following the methodology and experimental protocol as described in the previous section, this section presents the results of the basic small arms recognition model, while exploring the possibilities of improvement towards the development of a small arms recognition model. The section also explores the prospects of using such model in the field of small arms control, as well as the avenues for developing a complex model of small arms identification. Results on the effectiveness of the basic small arms recognition model Following the experimental protocol described in this paper, 60 t(x) tests were first conducted to measure success s(y), highlighting the categories of small arms tested (Fig. 5). Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 9 Figure 5 Results of the basic model on a sample t(60) Thus, the graph provides an opportunity to test the recognition accuracy of the basic model by focusing on the categories of weapons tested, and to assess the strengths and weaknesses of this basic small arms recognition model. First, it was observed that the recognition 'predictions' made by the model are often made with a predictability p(y) close to 100, that is, the maximum and with almost total confidence in the prediction. Thus, when the model correctly predicts the weapon category, one often obtains an s(y) close to 100; however, when it poorly predicts the weapon category, one obtains an s(y) close to 0 because the model puts a predictability p(y) close to 100 on another model. It is interesting to note that when s(y) = 100, these are often, but not exclusively, models of small arms in inputs that are already present in the model's database; however, the model also performs recognitions with s(y) = 100 on models of small arms that are still unknown to it. Nevertheless, when s(y) = 0, it is, almost exclusively and always, about small arms models in inputs which are not present in the initial database of the basic model, and which are thus unknown to it. Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 10 With an average �̅�(60) = 82.33 for all 60 tests, there is almost 39 s(y) = 100, almost 48 s(y) > 50, and 5 s(y) = 0. Considering that s(y) > 50 is equivalent to a success in recognising the category of small arms, the test sample had a success rate of 80%. There is an interesting difference in the prediction of recognition of certain categories of weapons. Indeed, it seems that assault rifles and handguns have the highest success rate in recognition by the basic model, while the other categories have several failures in the test sample; therefore, it seems that the categories with the most successful recognition are those with the most initial data available to the basic model. When faced with misses in other categories, it seems that the model opts for a full false recognition towards the categories where the model has a larger database. Beyond this observation, it also seems that some categories of weapons have more similarities between them than others, which can potentially distort the recognition model in its output. This situation is particularly prevalent when dealing with models that could be described as hybrids and that have either the visual characteristics of other categories of small arms or visual characteristics common to several categories of small arms, which can lead to recognition errors on the part of the model. It is also interesting to note that some weapon modifications or homemade weapons can cause the model to make incorrect outputs. Directly related to this issue of hybrids is the issue of accessories and colours which can influence the degree of accuracy of the recognition model. It seems that on very rare occasions, the addition of certain accessories (e.g., large capacity magazine, scope, grenade launcher) to the input small arms, can change the accuracy of the recognition model, or even tilt the recognition to another category of small arms. To a lesser extent, it also seems that the colour of the weapon can influence the effectiveness of the model if the colour of an input is close to the colours present in the initial database of a different small arms category than the correct category for that firearm. This brings back the additional sample of 10 fantasy inputs, with fictional weapons and toys as described in the experimental protocol of this paper. While it is difficult to associate a weapon category for these inputs, it seems that the basic model makes an interesting recognition of the weapon categories to which some of these inputs might be related. Although it seems difficult to judge the effectiveness of these recognitions, a greater diversity of different p(y) in different categories can be noted, which seems to signify the fact that these inputs Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 11 are not present in the initial databases and thus pushes the model more towards forward inference. Perspectives for improving the basic model towards a developed small arms recognition model To go beyond the basic small arms recognition model that has been developed, tested, and presented in this paper, the potential for improvement of this basic model is put into perspective here to move towards a developed model that would provide better recognition with a success rate s(y) almost always close to 100. From the results and observations provided in the previous subsection, it seems that it is possible to draw several potential ways of improvement to obtain a developed model of small arms recognition. First, the fact that the categories of small arms with the most initial data are the most successful in the recognitions performed, makes it possible to put forward an important factor in deep learning processes, namely the importance of the initial database, and the larger the database, not only in terms of images but also in terms of firearms models, the higher the rate of success. Therefore, it seems that beyond the assault rifle and handgun category, it would be crucial to build a larger initial database to have a more accurate model in its recognition. It would be recommended to have a minimum of 1,000 different images per weapon category, and to be as inclusive as possible, we also recommend including images from different angles, of different colours, and with many configurations as possible in terms of accessories. It is important to reiterate that having an exhaustive initial database in terms of small arms models allows this model to base its recognitions on inputs that are not totally unknown to it, giving a better chance of success in its recognitions. In addition to all these improvements, it is also important to keep a certain balance between the initial databases of each category of small arms to have recognitions that are not biased by the fact that the initial database of a category is less populated than that of another category. Finally, it would also be interesting to train the model differently by increasing the number of epochs, that is, the number of training processes of the model, which had been fixed here at 50 for the elementary model, but which could be increased with the enlargement of the initial databases of each category. Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 12 Prospects for using a developed small arms recognition model and developing a complex small arms identification model To put the implementation of a developed small arms recognition model into perspective, this section presents a few possible uses in the field of conventional disarmament, as well as prefiguring the development of a complex small arms identification model. One of the main uses that can be considered for such a developed model is the processing of large databases in different settings that may require the classification of large volumes of small arms. This may include, for example, the classification of arms stocks for export and import control dealing with large shipments. It may also be useful for national armies to keep photographic records of their stocks and carry out, for example, quick checks on the status beyond manual inspection, which may be inaccurate on large stocks. It may also be possible to analyse large quantities of stocks that are seized; with a large database of images available it would be possible to determine, for example, the specific composition of a non-state armed group’s arsenal. Finally, it is also possible to envisage that in conflict situations, one could determine the arsenal of armed groups through large databases of photos circulating on social networks, although the difficulty remains in not counting the same weapons several times. To push the perspectives of use of such a developed model of recognition, the notion of complex model of recognition and identification of small arms is also introduced in this paper. This type of model would make it possible, by linking a model and sub-models, to recognise the category of small arms. Subsequently, depending on the result, to run a specific sub-model identification, which could, for example, identify the family of small arms models within a category, and then identify with precision the specific model of the small arms in input (Fig. 6) Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 13 Figure 6 Example of a potential complex model for recognition and identification of small arms However, this type of complex model requires very large and different databases to have consistent and accurate results. Furthermore, it is important for the results from the first recognition model to be highly accurate so that sub-model identification is initiated correctly, corresponding to the right category of small arms. Beyond this potential complex model, it seems that this type of technology could also be further developed in some areas of conventional disarmament to automate some detection, recognition, and identification tasks or to deepen some aspects in the field. Examples include the recognition and identification of small arms cartridges through markings, shapes, and measurements; or the identification of the manufacturer’s markings and the origin of certain craft-weapons according to their markings or visual specificities. Conclusion This paper presents and puts into perspective the development and potential uses of a small arms recognition model. By first theorising the framework of small arms detection, recognition, and identification, the different tasks involved in these processes of object examination have been highlighted to better understand the focus of this research. Subsequently, the paper also theorised a categorisation of small arms as used in the basic small arms recognition model. From this theoretical aspect, this paper also highlighted a proper methodology through a theoretical framework of the use of deep learning in the basic recognition model, while detailing the experimental protocol to test this basic recognition model. The initial results of the basic model were highlighted, while presenting the Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 14 technical perspectives of improving this basic model towards a developed recognition model. Perspectives on the use of the developed recognition model in the field of conventional disarmament were then considered, while laying the theoretical foundation for the establishment and development of a complex small arms identification model. The results of this research show that the basic small arms recognition model is highly accurate for certain categories of small arms with a fairly small database. Several ways of improving this basic model, specifically through a larger and more heterogeneous database, have been identified in the paper to develop a complex identification model composed of several sub-models. Beyond these technical explorations, the paper also highlights several possible uses, notably in the field of conventional disarmament to obtain specific information on large quantities of data. That would also provide the opportunity to automate the recognition and identification of large arsenals of weapons, while potentially developing automated deep learning processes in other tasks related to conventional disarmament processes. It thus seems interesting, for future work, to focus on elaborating a developed small arms recognition model and further developing and implementing a complex small arms identification model. That would offer a powerful tool in the field of conventional disarmament, while opening up the deep learning approach to other specific tasks in this field. Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 15 References Abramson, J. (2008). UN register captures expanded small arms trade. Arms Control Today, 38(8), 45–46. https://www.armscontrol.org/act/2008- 10/un-register-captures-expanded-small-arms-trade Ba, J., Mnih, V., & Kavukcuoglu, K. (2015). Multiple object recognition with visual attention. ArXiv :1412.7755 [Cs.LG]. http://arxiv.org/abs/1412.7755 Carriquiry, A., Hofmann, H., Hui Tai, X., & VanderPlas, S. (2019). Machine learning in forensic applications. Significance, 16(2), 29–35. https://doi.org/10.1111/j.1740-9713.2019.01252.x Cutshaw, C. (2006). Tactical small arms of the 21st century: A complete guide to small arms from around the world. Krause Publications Inc. Eitel, A., Springenberg, J. T., Spinello, L., Riedmiller, M., & Burgard, W. (2015). Multimodal deep learning for robust RGB-D object recognition. In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) (pp. 681–687). https://doi.org/10.1109/IROS.2015.7353446 Gasparetti, F., De Medio, C., Limongelli, C., Sciarrone, F., & Temperini, M. (2018). Prerequisites between learning objects: Automatic extraction based on a machine learning approach. Telematics and Informatics, 35(3), 595–610. https://doi.org/10.1016/j.tele.2017.05.007 Hogg, I. (2000). Military small arms of the 20th century. Krause Publications Inc. Hosley, W. (1999). Guns, gun culture, and the peddling of dreams. In Guns in America: A reader (p. 47). New York University Press. Jane’s Weapons: Infantry yearbook 20/21. (2021). Jane’s Group. Jenzen-Jones, N. R., & Schroeder, M. (2018). An introductory guide to the identification of small arms, light weapons, and associated ammunition. Small Arms Survey. https://www.smallarmssurvey.org/resource/introductory-guide- identification-small-arms-light-weapons-and-associated-ammunition https://www.armscontrol.org/act/2008-10/un-register-captures-expanded-small-arms-trade https://www.armscontrol.org/act/2008-10/un-register-captures-expanded-small-arms-trade http://arxiv.org/abs/1412.7755 https://doi.org/10.1111/j.1740-9713.2019.01252.x https://doi.org/10.1109/IROS.2015.7353446 https://doi.org/10.1016/j.tele.2017.05.007 https://www.smallarmssurvey.org/resource/introductory-guide-identification-small-arms-light-weapons-and-associated-ammunition https://www.smallarmssurvey.org/resource/introductory-guide-identification-small-arms-light-weapons-and-associated-ammunition Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 16 Kanehisa, R., & Neto, A. (2019). Firearm detection using convolutional neural networks. In Proceedings of the 11th International Conference on Agents and Artificial Intelligence – Volume 2: ICAART (pp. 707–714). SciTe Press. https://doi.org/10.5220/0007397707070714 Narejo, S., Pandey, B., Esenarro 16argas, D., Rodriguez, C., & Anjum, M. R. (2021). Weapon detection using yolo v3 for smart surveillance system. Mathematical Problems in Engineering, 2021. https://doi.org/10.1155/2021/9975700 Olmos, R., Tabik, S., & Herrera, F. (2017). Automatic handgun detection alarm in videos using deep learning. Neurocomputing, 275, 66–72. http://arxiv.org/abs/1702.05147 Popenker, M., & Williams, A. (2004). Assault rifle: The development of the modern military rifle and its ammunition. The Crowood Press UK. Rose, A. (2009). American Rifle: A Biography. Delta. Sislin, J. (1998). A convergence of weapons. Peace Review, 10(3), 455–461. https://doi.org/10.1080/10402659808426184 United Nations Office on Drugs and Crime (UNDOC). (n.d.). Typology and classification of firearms. In Module 2: Basics on firearms and ammunition. https://www.unodc.org/e4j/zh/firearms/module-2/key- issues/typology-and-classification-of-firearms.html Wang, X. (2016). Deep learning in object recognition, detection, and segmentation. Foundations and Trends in Signal Processing, 8(4), 217– 382. http://dx.doi.org/10.1561/2000000071 Willbanks, J. (2004). Machine guns: An illustrated history of their impact. ABC-CLIO. Xu, S., & Hung, K. (2020). Development of an ai-based system for automatic detection and recognition of weapons in surveillance videos. In 2020 IEEE 10th Symposium on Computer Applications Industrial Electronics. (ISCAIE) (pp. 48–52). IEEE. https://doi.org/10.1109/ISCAIE47305.2020.9108816 https://www.scitepress.org/ProceedingsDetails.aspx?ID=Lvy8ot6Hlxo=&t=1 https://www.scitepress.org/ProceedingsDetails.aspx?ID=Lvy8ot6Hlxo=&t=1 https://doi.org/10.5220/0007397707070714 https://doi.org/10.1155/2021/9975700 http://arxiv.org/abs/1702.05147 https://doi.org/10.1080/10402659808426184 https://www.unodc.org/e4j/zh/firearms/module-2/key-issues/typology-and-classification-of-firearms.html https://www.unodc.org/e4j/zh/firearms/module-2/key-issues/typology-and-classification-of-firearms.html http://dx.doi.org/10.1561/2000000071 https://doi.org/10.1109/ISCAIE47305.2020.9108816 Theò Bajon The Journal of Intelligence, Conflict, and Warfare Volume 5, Issue 1 17 Author Biography Theò Bajon is an Associate Researcher in the UNIDIR’s Conventional Arms and Ammunition Programme. He previously worked with the United Nations Regional Centre for Peace, Disarmament and Development in Latin America and the Caribbean (UNLIREC) as a Project Associate on the implementation of national action plans in the framework of the Caribbean Firearms Roadmap and with the United Nations Development Programme within the Inter-Agency Working Group on Disarmament, Demobilization and Reintegration (IAWG- DDR) as a UNV on monitoring DDR processes around the world. He holds a master's degree in International Expertise and Risks at the University of Lyon 3 and a bachelor's degree in Political Science and Europe from the University of Avignon. Previously, he was a student at the Aix-en-Provence Military High School. He is currently pursuing a PhD in International Security and Defence. His research interests focus on the issues related to conventional disarmament processes in general and, more specifically, in conflict and post-conflict settings, as well as the role of regional organisations and sub-state actors in these processes. This work is licensed under a Creative Commons Attribution-Non- Commercial-NoDerivatives 4.0 International License. © (THEÒ BAJON, 2022) Published by the Journal of Intelligence, Conflict, and Warfare and Simon Fraser University Available from: https://jicw.org/