Hybrid-Margin Softmax for the Detection of Trademark Image Similarity
Abstract
:1. Introduction
- (1)
- We researched the TMISD task with prevalent methods in metric learning including data-driven and loss-driven. The performance of these methods was investigated from several evaluation aspects regarding the TMISD task, including accuracy, F1 score, training cost, and generalization ability.
- (2)
- According to the peculiarity of TM images, a hybrid-margin softmax (HMS) is proposed. Two additive margins are attached to the cosine term and the angular term of softmax, respectively, to expand the decision boundary in the angular space. The magnitudes of the weight and feature vector are preserved to retain the input information as much as possible. The metric function used to calculate the similarity is replaced by a classifier, i.e., a fully connected layer.
- (3)
- Experiments indicate that the detection model penalized by HMS can be trained on small numbers of annotated data and reaches high detection accuracy with fewer layers of SNN. Furthermore, the HMS detection model trained completely on TM data generalizes well on the face recognition (FR) task, which indicates that the model trained on HMS has great input image discrimination ability.
2. Materials and Methods
2.1. Hybrid-Margin Softmax
- (1)
- The compositions of images in an FR task are constant. The principal parts of the input pairs of samples are human faces that always come from one exact person or different ones. The features extracted from the input are fixed generally, such as the shapes of faces, eyes, and noses. Plus, there are external interfering terms that should be considered including gestures, illuminations, ages, image noises, etc.
- (2)
- The TMISD task is aimed at detecting the similarity of TM images. Generally, a TM design consists of a single element or several ones. The elements of the disputed TM image will not be identical to the legal one but partly similar in contours, colors, and textures, as shown in Figure 1. It is common for there to be both similar and different elements between two TM images in disputed cases. It should be noted that new outlines can be formed by the varying placements of elements. Furthermore, interfering terms mentioned in the FR task are no longer to be considered, since TM images are artificially designed in most cases.
2.2. Interpretation of HMS
3. Results
3.1. Datasets
3.2. Experimental Setup
- (1)
- Fine-tuning method: An SNN to be transferred is trained on the LFW training dataset. The backbone of the SNN is composed of an original series of resnet. When the SNN reaches 95% or more accuracy on the LFW test dataset, the fully connected layer is removed and the rest of the weights are frozen. The trained and frozen SNN and a new fully connected layer compose the TM detection model. Then, the model is further trained on the TM training dataset and tested on the TM test dataset.
- (2)
- Triplet model: Each input consists of two similar TM images, a dissimilar one, and corresponding labels. The triplet is built from the TM training dataset by attaching a random TM image to the pairs of similar samples.
3.3. Loss-Driven Method Experiments
3.4. Data-Driven Method Experiments
3.5. Discussion
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Duch-Brown, N.; Martens, B.; Mueller-Langer, F. The Economics of Ownership, Access and Trade in Digital Data. SSRN J. 2017. [Google Scholar] [CrossRef]
- Johnson, S. Trademark Territoriality in Cyberspace: An Internet Framework for Common-Law Trademarks. Berkeley Technol. Law J. 2014, 29, 1253–1300. [Google Scholar]
- Simon, D.A. The Confusion Trap: Rethinking Parody in Trademark Law. Wash. Law Rev. 2013, 88, 1021. [Google Scholar]
- Besen, S.M.; Raskind, L.J. An Introduction to the Law and Economics of Intellectual Property. J. Econ. Perspect. 1991, 5, 3–27. [Google Scholar] [CrossRef]
- Lowe, D.G. Distinctive Image Features from Scale-Invariant Keypoints. Int. J. Comput. Vis. 2004, 60, 91–110. [Google Scholar] [CrossRef]
- Rublee, E.; Rabaud, V.; Konolige, K.; Bradski, G. ORB: An Efficient Alternative to SIFT or SURF. In Proceedings of the 2011 International Conference on Computer Vision, Barcelona, Spain, 6–13 November 2011; pp. 2564–2571. [Google Scholar]
- Sabry, E.S.; Elagooz, S.S.; El-Samie, F.E.A.; El-Bahnasawy, N.A.; El-Banby, G.M.; Ramadan, R.A. Evaluation of Feature Extraction Methods for Different Types of Images. J. Opt. 2023, 52, 716–741. [Google Scholar] [CrossRef]
- Li, S.; Jin, J.; Li, D.; Wang, P. Research on Transductive Few-Shot Image Classification Methods Based on Metric Learning. In Proceedings of the 2023 7th International Conference on Communication and Information Systems (ICCIS), Virtual, 15–17 October 2023; pp. 146–150. [Google Scholar]
- Bromley, J.; Bentz, J.W.; Bottou, L.; Guyon, I.; Lecun, Y.; Moore, C.; Säckinger, E.; Shah, R. Signature verification using a “siamese” time delay neural network. Int. J. Patt. Recogn. Artif. Intell. 1993, 7, 669–688. [Google Scholar] [CrossRef]
- Koch, G.; Zemel, R.; Salakhutdinov, R. Siamese Neural Networks for One-Shot Image Recognition. In Proceedings of the 32nd International Conference on Machine Learning, Lille, France, 7–9 July 2015; Volume 37. [Google Scholar]
- Melekhov, I.; Kannala, J.; Rahtu, E. Siamese Network Features for Image Matching. In Proceedings of the 2016 23rd International Conference on Pattern Recognition (ICPR), Cancun, Mexico, 4–8 December 2016; pp. 378–383. [Google Scholar]
- Nandy, A.; Haldar, S.; Banerjee, S.; Mitra, S. A Survey on Applications of Siamese Neural Networks in Computer Vision. In Proceedings of the 2020 International Conference for Emerging Technology (INCET), Belgaum, India, 5–7 June 2020; pp. 1–5. [Google Scholar]
- Hoffer, E.; Ailon, N. Deep Metric Learning Using Triplet Network. In Similarity-Based Pattern Recognition, Proceedings of the Third International Workshop, SIMBAD 2015, Copenhagen, Denmark, 12–14 October 2015; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
- Boutros, F.; Damer, N.; Kirchbuchner, F.; Kuijper, A. ElasticFace: Elastic Margin Loss for Deep Face Recognition. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), New Orleans, LA, USA, 19–20 June 2022; pp. 1577–1586. [Google Scholar]
- Choi, J.; Kim, Y.; Lee, Y. Robust Face Recognition Based on an Angle-Aware Loss and Masked Autoencoder Pre-Training. In Proceedings of the ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Seoul, Republic of Korea, 14–19 April 2024; pp. 3210–3214. [Google Scholar]
- Liu, W.; Wen, Y.; Yu, Z.; Li, M.; Raj, B.; Song, L. SphereFace: Deep Hypersphere Embedding for Face Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018. [Google Scholar]
- Wang, H.; Wang, Y.; Zhou, Z.; Ji, X.; Gong, D.; Zhou, J.; Li, Z.; Liu, W. CosFace: Large Margin Cosine Loss for Deep Face Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018. [Google Scholar]
- Wang, F.; Cheng, J.; Liu, W.; Liu, H. Additive Margin Softmax for Face Verification. IEEE Signal Process. Lett. 2018, 25, 926–930. [Google Scholar] [CrossRef]
- Deng, J.; Guo, J.; Yang, J.; Xue, N.; Kotsia, I.; Zafeiriou, S. ArcFace: Additive Angular Margin Loss for Deep Face Recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 44, 5962–5979. [Google Scholar] [CrossRef] [PubMed]
- Setchi, R.; Anuar, F.M. Multi-Faceted Assessment of Trademark Similarity. Expert Syst. Appl. 2016, 65, 16–27. [Google Scholar] [CrossRef]
- Trappey, C.V.; Trappey, A.J.C.; Lin, S.C.-C. Intelligent Trademark Similarity Analysis of Image, Spelling, and Phonetic Features Using Machine Learning Methodologies. Adv. Eng. Inform. 2020, 45, 101120. [Google Scholar] [CrossRef]
- Alshowaish, H.; Al-Ohali, Y.; Al-Nafjan, A. Trademark Image Similarity Detection Using Convolutional Neural Network. Appl. Sci. 2022, 12, 1752. [Google Scholar] [CrossRef]
- Huang, G.B.; Ramesh, M.; Berg, T.; Learned-Miller, E. Labeled Faces in the Wild: A Database for Studying Face Recognition in Unconstrained Environments; University of Massachusetts: Amherst, MA, USA, 2007. [Google Scholar]
- Huang, G.B.; Learned-Miller, E. Labeled Faces in the Wild: Updates and New Reporting Procedures; University of Massachusetts: Amherst, MA, USA, 2014. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
Transformations of Softmax | Accuracy (%) | |||||
---|---|---|---|---|---|---|
6-Layer | ResNet18 | ResNet34 | ResNet50 | ResNet101 | ResNet152 | |
SphereFace [16] | 96.25 | 95.36 | 96.39 | — * | — | — |
CosFace [17,18] | 43.81 | 51.55 | 52.06 | 52.58 | 55.15 | 58.76 |
ArcFace [19] | 46.39 | 47.94 | 53.09 | 52.06 | 56.70 | 52.58 |
HMS (normalized) | 54.12 | 53.61 | 54.12 | 57.73 | 52.06 | 53.09 |
HMS | 97.45 | 97.42 | 97.94 | 98.39 | 98.97 | 98.52 |
Transformations of Softmax | F1 Score | |||||
---|---|---|---|---|---|---|
6-Layers | ResNet18 | ResNet34 | ResNet50 | ResNet101 | ResNet152 | |
SphereFace [16] | 0.9539 | 0.9516 | 0.9574 | — | — | — |
CosFace [17,18] | 0.4171 | 0.4778 | 0.5131 | 0.5306 | 0.5915 | 0.5789 |
ArcFace [19] | 0.4800 | 0.4294 | 0.5381 | 0.5373 | 0.6216 | 0.5534 |
HMS (normalized) | 0.5189 | 0.5714 | 0.4671 | 0.6339 | 0.5373 | 0.5646 |
HMS | 0.9516 | 0.9735 | 0.9798 | 0.9749 | 0.9746 | 0.9897 |
Transformations of Softmax | Accuracy (%) | |||||
---|---|---|---|---|---|---|
6-Layers | ResNet18 | ResNet34 | ResNet50 | ResNet101 | ResNet152 | |
SphereFace [16] | — | — | — | — | — | — |
CosFace [17,18] | 45.63 | 47.25 | 46.97 | 47.38 | 47.82 | 46.38 |
ArcFace [19] | 46.05 | 48.23 | 49.07 | 48.63 | 46.87 | 46.90 |
HMS (normalized) | 50.13 | 50.50 | 49.06 | 50.55 | 48.30 | 51.18 |
HMS | 80.45 | 90.57 | 82.45 | 82.30 | 84.17 | 82.90 |
Transformations of Softmax | F1 Score | |||||
---|---|---|---|---|---|---|
6-Layers | ResNet18 | ResNet34 | ResNet50 | ResNet101 | ResNet152 | |
SphereFace [16] | — | — | — | — | — | — |
CosFace [17,18] | 0.3932 | 0.4468 | 0.4348 | 0.4411 | 0.5229 | 0.4389 |
ArcFace [19] | 0.4564 | 0.4461 | 0.5789 | 0.5466 | 0.5173 | 0.4927 |
HMS (normalized) | 0.3828 | 0.5380 | 0.3794 | 0.5524 | 0.3872 | 0.5978 |
HMS | 0.8173 | 0.9002 | 0.8464 | 0.8449 | 0.8517 | 0.8483 |
SNN (Contrastive Loss) Method | Triplet Network Method | Fine-Tuning Method | ||||
---|---|---|---|---|---|---|
Accuracy (%) | F1 | Accuracy (%) | F1 | Accuracy (%) | F1 | |
ResNet18 | 41.53 | 0.4237 | 85.05 | 0.8449 | 53.61 | 0.5588 |
ResNet34 | 46.73 | 0.4535 | 92.27 | 0.9282 | 70.65 | 0.7149 |
ResNet50 | 47.18 | 0.4654 | 58.25 | 0.6897 | 56.19 | 0.5685 |
ResNet101 | 46.53 | 0.4549 | 54.13 | 0.6642 | 47.42 | 0.5049 |
ResNet152 | 46.84 | 0.4431 | 59.28 | 0.6802 | 46.39 | 0.4851 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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
Wang, C.; Zheng, G.; Shan, H. Hybrid-Margin Softmax for the Detection of Trademark Image Similarity. Appl. Sci. 2024, 14, 2865. https://doi.org/10.3390/app14072865
Wang C, Zheng G, Shan H. Hybrid-Margin Softmax for the Detection of Trademark Image Similarity. Applied Sciences. 2024; 14(7):2865. https://doi.org/10.3390/app14072865
Chicago/Turabian StyleWang, Chenyang, Guangyuan Zheng, and Hongtao Shan. 2024. "Hybrid-Margin Softmax for the Detection of Trademark Image Similarity" Applied Sciences 14, no. 7: 2865. https://doi.org/10.3390/app14072865