Detecting anomalies in video surveillance, particularly for firearm detection, remains a critical challenge in public safety systems. Traditional methods often rely on human operators manually monitoring surveillance feeds, which is both inefficient and prone to error. Recent advances in deep learning (DL) offer a promising alternative by enabling models to identify anomalous events without relying on rare and difficult-to-obtain positive samples during training. In this paper, we propose an unsupervised firearm detection framework based on adversarial autoencoders (AAE) networks. By learning a robust representation of normal (negative) training data, the model is able to identify deviations indicative of firearm-related anomalies during inference. Anomaly scores for firearm detection are calculated using reconstruction errors, based on the probability that the test sample aligns with the prior distribution. Our approach enhances the interpretability of firearm related anomaly detection (AD) and demonstrates superior performance on benchmark firearm datasets. Experimental results demonstrate that the proposed method surpasses current state-of-the-art techniques by effectively identifying out-of-distribution (OOD) events in video frames, leveraging learned priors within the AAE architecture. Experimental results on benchmark firearm datasets, including VISILAB, UCF-Firearm, and YouTube demonstrate the effectiveness of our firearm detection approach, achieving an average precision (AP) of 95.2% and an average detection accuracy (ACC) of 95.6%.
Microscopy image acquisition is frequently limited by a shallow depth of field (DoF), restricted dynamic range (DR), uneven illumination, and noise, particularly when imaging transparent or weakly textured biological specimens. This work presents MFusionJ (MFJ), an open-source ImageJ/Fiji plugin for microscopic multi-focus image fusion (MFIF) and multi-exposure image fusion (MEIF). The proposed method combines two-scale decomposition (TSD), edge-preserving filtering (EPF), and weighted average fusion (WAF) to fuse base and detail layers separately using refined weight maps. MFJ was evaluated on heterogeneous microscopy datasets, including nine diatom MFIF datasets, 100 cyanobacteria stacks, 93 cervical cytology stacks, and ten diatom MEIF datasets. The comparison includes publicly or commercially available tools and methods that can be directly applied to microscopy image stacks, namely EDF, Zerene Stacker, Helicon Focus, Photomatix Pro, BLT-TM, and a CNN-based fusion baseline. In the diatom MFIF experiments, MFJ achieved the best average QAB/F and NAB/F scores, with values of 0.821 and 0.010, respectively. For cyanobacteria, MFJ obtained the best average QAB/F, NAB/F, and PIQE scores, with values of 0.543, 0.005, and 9.984, respectively. For cervical cytology, MFJ achieved the best average QAB/F, LAB/F, NAB/F, and BRISQUE scores, with values of 0.935, 0.065, 0.000, and 30.472, respectively. For MEIF, MFJ achieved the best PIQE score and average performance comparable to that of the leading methods in reference-based metrics. These results show that MFJ provides a reproducible, training-free, and user-accessible solution for enhancing DoF, preserving fine details, and reducing fusion artifacts in heterogeneous microscopy imaging scenarios.
Deep learning (DL) has significantly transformed computer vision, demonstrating remarkable achievements and extensive real-world applications. However, recent studies have highlighted a critical vulnerability of DL models to adversarial examples (AE), where slight perturbations in input data can lead to erroneous outputs. We observe that the behaviour of the AE is similar to a chaotic system, where a minor change in the input leads to a significantly different output. In response, we propose a novel approach for detecting and categorizing adversarial inputs encountered by classification neural networks. The proposed approach focuses on extracting statistical profiles, termed as chaotic feature vectors (CFVs), from a collection of features derived from ordinal patterns (OP). In this work, the proposed AE detection method is tested on seven attack methods and three image datasets including MNIST, FMNIST and CIFAR10. The results indicate that CFVs exhibit promising capabilities in discerning AE against various types of adversarial attacks on different datasets. This advancement lays the foundation for devising attack mitigation strategies, thereby enhancing the robustness and security of DL models in the face of adversarial threats.
Video surveillance systems can play a critical role in ensuring public safety by assisting in the early detection of potentially dangerous objects or actions, such as people carrying handguns or other weapons. Recent machine learning architectures based on multi-head self-attention modules have demonstrated their ability to process sequential data. In this work, we propose AWARE, a self-Attention based Weapon Activity Recognition architecture for video surveillance systems. The main idea behind this approach is to use a Transformer encoder module to extract relevant features from input video sequences and classify them as either weapon-related actions or non-dangerous actions. The input data is generated by combining 2D human pose keypoints and potential weapon locations generated by object detection models. We evaluate our proposed method on a new action recognition dataset composed of video sequences of gun-related actions. Experiments conducted show that the proposed method achieves better results than other similar methods in this context.
The digitalization of traditional glass slide microscopy into whole slide images has opened up new opportunities for pathology, such as the application of artificial intelligence techniques. Specialized software is necessary to visualize and analyze these images. One of these applications is QuPath, a popular bioimage analysis tool. This study proposes GNCnn, the first open-source QuPath extension specifically designed for nephropathology. It integrates deep learning models to provide nephropathologists with an accessible, automatic detector and classifier of glomeruli, the basic filtering units of the kidneys. The aim is to offer nephropathologists a freely available application to measure and analyze glomeruli to identify conditions such as glomerulosclerosis and glomerulonephritis. GNCnn offers a user-friendly interface that enables nephropathologists to detect glomeruli with high accuracy (Dice coefficient of 0.807) and categorize them as either sclerotic or non-sclerotic, achieving a balanced accuracy of 98.46%. Furthermore, it facilitates the classification of non-sclerotic glomeruli into 12 commonly diagnosed types of glomerulonephritis, with a top-3 balanced accuracy of 84.41%. GNCnn provides real-time updates of results, which are available at both the glomerulus and slide levels. This allows users to complete a typical analysis task without leaving the main application, QuPath. This tool is the first to integrate the entire workflow for the assessment of glomerulonephritis directly into the nephropathologists' workspace, accelerating and supporting their diagnosis.
Parasitic infections pose a significant health risk in many regions worldwide, requiring rapid and reliable diagnostic methods to identify and treat affected individuals. Recent advancements in deep learning have significantly improved the accuracy and efficiency of microscopic image analysis workflows, enabling its application in various domains such as medical diagnostics and microbiology. This work presents DT4PEIS, a novel two-stage architecture for the instance segmentation of parasite eggs in microscopic images. The first stage is a DEtection TRansformer (DETR) based architecture, which predicts the bounding boxes and class labels of the detected eggs. Then, the predicted bounding boxes are used as prompts to guide the segmentation process in the second stage, which is based on the Segment Anything Model (SAM) architecture. We evaluate the performance of the proposed method on the Chula-ParasiteEgg-11 dataset. Our results show that the proposed method outperforms the other architectures in terms of segmentation mean Average Precision (mAP), providing a more detailed and accurate representation of the detected eggs.
Cyanobacteria play a fundamental role in aquatic ecosystems, contributing to global biogeochemical cycles and serving as indicators of environmental change. Their classification is critical for monitoring water quality, detecting harmful algal blooms and understanding ecosystem dynamics. However, accurate identification remains a major challenge due to their vast taxonomic diversity and significant morphological similarities. Visual inspection alone is often insufficient, highlighting the need for computational approaches to enhance classification accuracy. In this study, we present a multimodal deep learning model that combines convolutional neural networks (CNNs) for image-based feature extraction with bidirectional transformers for text embedding. These complementary features are fused via concatenation to improve species-level classification. To our knowledge, this is the first application of a multimodal neural architecture integrating CNNs and bidirectional transformers for cyanobacteria classification. We evaluated five CNN backbones of varying depth, resulting in eight model configurations. Performance is benchmarked against unimodal CNN models that rely solely on image data. The model is trained and validated on a dataset of 1660 microscopic images and corresponding textual descriptions, covering nine cyanobacterial genera across three taxonomic orders. Results demonstrate the potential of multimodal deep learning to improve classification performance, supporting the development of scalable and accurate identification tools in microbiology and environmental monitoring.
The recognition of phytoplankton in microscopy images remains a challenging task due, among other factors, to the vast diversity of known species and the limited availability of labeled training data. Recent advances in pattern recognition have facilitated the automation of this process, offering experts tools to reduce annotation time and increase classification reliability. However, the core difficulty persists, traditional models struggle with unseen species and data scarcity. This study presents a novel application of Prototypical Networks for the automatic recognition of cyanobacteria and diatoms, a method not previously applied to this domain, to the best of our knowledge. Our approach addresses a critical limitation of conventional classifiers by enabling the integration of new, previously unseen species into the recognition framework. To this end, data balancing and augmentation techniques based on deep learning were applied, followed by the training of detection and classification models using Few-Shot Learning, with a focus on Prototypical Networks. The results demonstrate the model's ability to incorporate novel cyanobacteria and diatom genera with minimal annotated data, offering a promising solution for biodiversity monitoring and environmental assessment.
Collaborative decision-making (CDM) is essential in different domains where integrating diverse perspectives improves classification accuracy. Traditional aggregation methods, such as majority voting (MV), are static and fail to capture the dynamic, real-time interactions among decision-makers. We propose a task- and label-independent framework based on spatio-temporal graph neural networks (STGNNs) to model CDM as an evolving process. The framework represents participants and classification options as nodes in graph sequences, capturing relational dependencies (e.g., agreement clusters) and temporal patterns (e.g., convergence to consensus). It integrates a graph neural network with a gated recurrent unit to jointly model spatial and temporal dynamics, and introduces an auxiliary loss that reinforces agreement structure and option alignment in the embedding space. We evaluated the framework on five expert-driven image classification tasks in biology and pathology using a web-based collaborative platform. In human-only settings, STGNNs achieved a global accuracy of 77.6% (Δ=+4.3% over MV, p<0.001). When extended to mixed human–AI teams, a meta-learning aggregator combining STGNN and AI agent predictions achieved a global accuracy of 81.4%, outperforming both human-only models and MV. These findings demonstrate the utility of STGNNs for modeling latent decision dynamics and enhancing collaborative performance in complex, ambiguous settings. The task- and label-independence of the framework suggests broad applicability across domains.
Antibody-mediated rejection (AMR) remains a significant cause of late allograft failure. However, considerable variability exists in its diagnosis, even among experts. Weakly supervised machine learning applied to renal biopsy whole slide images (WSIs) could offer cost-efficient and accurate diagnostics with perfect reproducibility. In this study, we build on our previous work developing diagnostic models for AMR using a multi-institutional dataset including adversarial samples such as accommodation, transmitted, recurrent, and de novo diseases. A dataset of 1,183 periodic acid-Schiff WSIs from 348 patients from four different institutions was automatically segmented into tissue compartment crops. Graph neural networks (GNNs) were employed to classify AMR and non-AMR (including adversarial samples like accommodation, transmitted and de novo glomerulopathy). The WSIs were represented as fully connected graphs, with glomerular crops as nodes, capturing global spatial relationships. Feature vectors for individual glomerular crops were computed using both supervised (Swin Transformer) and self-supervised (MAE and SimCLR) architectures. Classification was performed using Graph-Transformer and three novel models: SimpleGCN, DenseGCN, and SimpleGAT. These WSI-level classifiers were compared to state-of-the-art patch-level classification methods (Swin and ConvNeXt). Performance was determined in 5-fold internal cross-validation experiments. The GNN-based methods outperformed baseline patch-level classification models. The best- performing model, SimpleGCN with Swin-extracted features, achieved an accuracy of 71.00% and an AUC of 0.7858, significantly better than the Swin model (accuracy of 65.66% and an AUC of 0.7265). This study shows the potential of graph-based representations to model contextual information in nephropathology images. Our approach permits easy upscaling of training cohorts for cost-efficient and even more accurate diagnostic support systems. To this end and for further validation we are actively seeking collaborators. GB and JUB contributed equally.
PURPOSE:Breast ultrasound (BUS) computer-aided diagnosis (CAD) systems aims to perform two major steps: detecting lesions and classifying them as benign or malignant. However, the impact of combining both steps has not been previously addressed. Moreover, the specific method employed can influence the final outcome of the system. MATERIALS AND METHODS:In this work, a comparison of the effects of using object detection, semantic segmentation and instance segmentation to detect lesions in BUS images was conducted. To this end, four approaches were examined: a) multi-class object detection, b) one-class object detection followed by localized region classification, c) multi-class segmentation, and d) one-class segmentation followed by segmented region classification. Additionally, a novel dataset for BUS segmentation, called BUS-UCLM, has been gathered, annotated and shared publicly. The evaluation of the methods proposed was carried out with this new dataset and four publicly available datasets: BUSI, OASBUD, RODTOOK and UDIAT. RESULTS:Among the four approaches compared, multi-class detection and multi-class segmentation achieved the best results when instance segmentation CNNs are used. The best results in detection were obtained with a multi-class Mask R-CNN with a COCO AP50 metric of 72.9%. In the multi-class segmentation scenario, Poolformer achieved the best results with a Dice score of 77.7%. CONCLUSIONS:The analysis of detection and segmentation models in BUS highlights several key challenges, emphasizing the complexity of accurately identifying and segmenting lesions. Among the methods evaluated, instance segmentation has proven to be the most effective for BUS images, offering superior performance in delineating individual lesions.
In an era where security concerns are ever-increasing, the need for advanced technology to detect visible and concealed weapons has become critical. This paper introduces a novel two-stage method for concealed handgun detection, leveraging thermal imaging and deep learning, offering a potential real-world solution for law enforcement and surveillance applications. The approach first detects potential firearms at the frame level and subsequently verifies their association with a detected person, significantly reducing false positives and false negatives. Alarms are triggered only under specific conditions to ensure accurate and reliable detection, with precautionary alerts raised if no person is detected but a firearm is identified. Key contributions include a lightweight algorithm optimized for low-end embedded devices, making it suitable for wearable and mobile applications, and the creation of a tailored thermal dataset for controlled concealment scenarios. The system is implemented on a chest-worn Android smartphone with a miniature thermal camera, enabling hands-free operation. Experimental results validate the method’s effectiveness, achieving an mAP@50-95 of 64.52% on our dataset, improving state-of-the-art methods. By reducing false negatives and improving reliability, this study offers a scalable, practical solution for security applications.
Deep neural networks (DNNs) have demonstrated strong performance in classification-based applications in the field of machine learning (ML). A DNN model is nonetheless susceptible to adversarial examples (AE), which are created by introducing minor well-designed changes to a regular example. In important security-sensitive systems, these undetectable small perturbations can fool the DNN model into making a mistake. In this work, we suggest a novel model-agnostic adversarial example detection technique using multivariate features based on pre-detector based defense. The suggested approach extracts the generalized alignment index (GALI) and the guided filter (GF) based spatial features (SFs) that offer an effective criteria for distinguishing between adversarial and normal cases. We use space-filling curve (SFC) to vectorize the images of the normal and adversarial instances, and then determine the GALI feature values for the examples using a chaos detection method based on time-series-analysis. The GF is used to determine the values of the local features. On the basis of multivariate feature values, an Isolation Forest classifier (IFC) is lastly trained to recognize adversarial samples. The experimental findings across benchmark datasets show that the suggested strategy can recognize AE with high accuracy using a broad range of attack categories.
Introduction: Metastasis in the axillary lymph nodes (ALNs) occurs in 30-50% of breast cancers (BCs), where residing immune cells play a crucial role in disease progression. Specifically at diagnosis, the immune elements infiltrating the primary tumour are among the best established prognostic factors. However, their prognostic value in the metastatic ALNs (ALNs+) is poorly understood. METHODS:We aimed to retrospectively assess the immune populations of ALNs+ in luminal A (LA) and triple-negative BC (TNBC) patients using immunohistochemistry, to compare it with non-metastatic ALNs (ALNs-), and to determine their relationship with patient outcomes. RESULTS:We found differences in the immune concentrations of matched ALNs (ALNs- vs. ALNs+) from patients with positive nodal status in either LA or TNBC subtypes. In contrast, compared with LA, the levels of immune cells in ALNs- of the TNBC profile differ much more from ALNs+ than in the LA subtype, regardless of the nodal status. In addition, TNBC patients with higher levels of CD4 and CD8 lymphocytes in ALNs+ have worse cancer-specific survival (CSS) and higher levels of CD83 dendritic cells (DCs) are related to worse CSS and time to progression (TTP). Conversely, LA patients with higher levels of CD21 DC showed better TTP. CONCLUSION:Our results showed that ALN immune profiles and their influence on disease evolution vary by molecular BC subtype and nodal status, suggesting that accurate ALN immune profiling at diagnosis could provide new insights into the immune BC landscape. These observations require validation in larger, prospective cohorts before they can be reliably used to inform clinical decision-making. .
Collaborative decision-making is essential in expert-driven image classification tasks, where individual assessments may be inconsistent or limited. We propose a task- and label-independent spatiotemporal graph neural network (STGNN) framework to model realtime interactions among human participants during group classification. The architecture combines graph neural networks (GNNs) and recurrent units to capture relational and temporal dependencies across dynamic graph sequences, with an auxiliary contrastive loss encouraging alignment among agreeing participants, coherence with chosen options and separation from alternatives. Experiments on a collaborative web platform covered five expert classification tasks of varying complexity, including cyanobacteria and diatom identification, Ki67 scoring, HER2 grading and glomerulonephritis diagnosis. From 1,369 group classification instances by 34 participants, multiple STGNN configurations were tested, varying GNN architecture, feature initialization and temporal granularity. Stratified 5-fold cross-validation showed several configurations outperforming the majority voting (MV) baseline in global top1 accuracy, with the best (GIN+GRU, T = 20) achieving 0.7757 vs. 0.7633 for MV. Improvements were also observed in complex tasks such as glomerulonephritis (0.4778 vs. 0.4167), HER2 (0.6100 vs. 0.5633), and Ki67 (0.8261 vs. 0.7993), demonstrating the potential of STGNNs for enhancing collaborative image classification.
Environmental microscopy is crucial for analyzing microorganisms, but traditional optical microscopes are often expensive, bulky, and impractical for field use. AI-driven image recognition, powered by deep learning models like YOLO, enhances microscopy analysis but typically requires high computational resources. To address these challenges, we present two cost-effective pipelines integrating AI with low-cost microscopes and edge computing. Both approaches use the OpenFlexure Microscope and Raspberry Pi devices. The first performs real-time inference with a Raspberry Pi 5 and Hailo-8L accelerator, while the second captures images with a Raspberry Pi 4, transferring them to a GPU-equipped desktop for processing. Using YOLOv8, we evaluate their ability to detect phytoplankton species, including cyanobacteria and diatoms. Results show that edge computing enables accurate, efficient, and low-power microscopy analysis, demonstrating its potential for real-time environmental monitoring in resource-limited settings.
Antibody-mediated rejection (AMR) is a leading cause of kidney transplant failure, requiring accurate histopathological assessment for diagnosis. This study evaluates graph-based deep learning models for AMR classification using periodic acid-Schiff (PAS)-stained whole slide images (WSIs), with the aim of improving diagnostic accuracy and reproducibility. A multi-institutional dataset of 1193 WSIs from 348 patients was used, where glomeruli, arteries, and cortical tubulointerstitial regions were segmented via deep learning and represented as nodes in graph-structured data. Feature extraction was performed using both supervised and self-supervised methods, and classification was conducted with four graph neural network (GNN) architectures: Graph-Transformer, and the novel SimpleGCN, DenseGCN and SimpleGAT. Patch-wise convolutional and transformer-based classifiers served as baselines. All models were evaluated at both the WSI and biopsy levels using stratified five-fold cross-validation. GNN-based models consistently outperformed patch-wise baselines, with the best glomeruli-only GNN achieving a 5.34 % improvement in WSI-level accuracy (71.00 %) over the strongest baseline. Incorporating additional compartments (arteries and cortex) further improved accuracy to 86.97 % at the WSI level and 89.53 % at the biopsy level, with statistically significant gains confirming the additive value of multi-compartment modeling. Performance varied across feature extractors and graph configurations, underscoring the complexity of optimizing computational pipelines for AMR diagnosis. Overall, graph-based modeling substantially enhances AMR diagnostic performance over conventional approaches, enabling scalable, low-cost and reproducible workflows with minimal expert input. These findings demonstrate the potential of GNNs to support nephropathologists in delivering more consistent and reliable diagnoses, with future work needed to refine feature representations and integrate multimodal data for broader clinical utility.
This dataset comprises 38 breast ultrasound scans from patients, encompassing a total of 683 images. The scans were conducted using a Siemens ACUSON S2000TM Ultrasound System from 2022 to 2023. The dataset is specifically created for the purpose of segmenting breast lesions, with the goal of identifying the area and contour of the lesion, as well as classifying it as either benign or malignant. The images can be classified into three categories based on their findings: 419 are normal, 174 are benign, and 90 are malignant. The ground truth is given as RGB segmentation masks in individual files, with black indicating normal breast tissue and green and red indicating benign and malignant lesions, respectively. This dataset enables researchers to construct and evaluate machine learning models for identifying between benign and malignant tumours in authentic breast ultrasound images. The segmentation annotations provided by expert radiologists enable accurate model training and evaluation, making this dataset a valuable asset in the field of computer vision and public health.
The increasing frequency of mass shootings at public events and public buildings underscores the limitations of traditional surveillance systems, which rely on human operators monitoring multiple screens. Delayed response times often hinder security teams from intervening before an attack unfolds. Since firearms are rarely seen in public spaces and constitute anomalous observations, firearm detection can be considered as an anomaly detection (AD) problem, for which one-class classifiers (OCCs) are well-suited. To address this challenge, we propose a holistic firearm detection approach that integrates OCCs with visual hand-held gun features and human pose estimation (HPE). In the first stage, a variational autoencoder (VAE) learns latent representations of firearm-related instances, ensuring that the latent space is dedicated exclusively to the target class. Hand patches of variable sizes are extracted from each frame using body landmarks, dynamically adjusting based on the subject’s distance from the camera. In the second stage, a unified feature vector is generated by integrating VAE-extracted latent features with landmark-based arm positioning features. Finally, an isolation forest (IFC)-based OCC model evaluates this unified feature representation to estimate the probability that a test sample belongs to the firearm-related distribution. By utilizing skeletal representations of human actions, our approach overcomes the limitations of appearance-based gun features extracted by camera, which are often affected by background variations. Experimental results on diverse firearm datasets validate the effectiveness of our anomaly detection approach, achieving an F1-score of 86.6%, accuracy of 85.2%, precision of 95.3%, recall of 74.0%, and average precision (AP) of 83.5%. These results demonstrate the superiority of our method over traditional approaches that rely solely on visual features.
Adversarial examples are an intriguing and critical topic in the field of machine learning. The impact of malignant perturbations on deep learning-based systems, especially in safety-critical applications, highlights a significant security concern. While most research has focused on artificially generated adversarial attacks-crafted through optimization algorithms and constrained perturbations, it is important to note that adversarial examples can also occur naturally, without any artificial manipulation, during the prediction of real-world images. These naturally occurring adversarial examples pose unique challenges, as they are harder to detect and interpret. Despite their importance, the study of natural adversarial examples remains in its early stages. Fundamental questions remain unanswered: Do natural adversarial examples exhibit similar behaviours or properties as artificially generated ones? How should models be adapted to improve their robustness against such natural inputs? To address these questions, this work proposes an in-depth analysis of activation maps to compare the internal behaviour of neural networks when processing clean images, artificially perturbed inputs and natural adversarial examples. A set of quantitative metrics is extracted from activation heatmaps at various network layers, including mean activation intensity, centroid displacement and standard reference image quality metrics. These measurements enable a systematic comparison of how the network attends to different image regions under varying conditions. The experimental results demonstrate that natural adversarial examples exhibit statistically significant differences in activation patterns compared to their artificial counterparts, suggesting that they may require distinct strategies for detection and defence.
Javier Lorenzo合作论文数Grupo de Inteligencia Artificial y Sistemas
I.U. de Sistemas Inteligentes y Aplicaciones Numéricas en Ingeniería5