A method, apparatus, and computer-readable medium for adaptive critical scene-aware classification system for autonomous navigation
The method addresses the limitations of monolithic models in autonomous vehicles by using a multi-head machine learning system to dynamically adapt to specific navigation scenes, improving accuracy and reliability through continuous learning and scene-specific detection.
Patent Information
- Application Number
- GB2024018398
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2024-12-16
- Publication Date
- 2026-01-07
AI Technical Summary
Existing autonomous vehicle perception systems face challenges in accurately classifying scenes in specific or challenging scenarios due to the reliance on monolithic models that generalize across diverse conditions, leading to reduced accuracy and computational inefficiencies, and lack of adaptability to dynamic environments.
A method utilizing a machine learning model with multiple heads trained on specific navigation scenes, employing patch embeddings, class tokens, and latent space projections to dynamically select the most relevant model head based on similarity scores, enabling continuous adaptation and improvement.
Enhances scene understanding, improves classification accuracy, and ensures reliable navigation by leveraging specialized knowledge for each scene, adapting to real-time conditions and continuously learning from new data.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
The present disclosure relates to machine learning. Specifically, the present disclosure relates to adaptive detection, recognition, and classification of navigation scenes for autonomous navigation. In the field of autonomous vehicles, the prior art primarily involves scene classification that relies on convolutional neural networks (CNNs) and large-scale, monolithic models. These models are typically trained on diverse datasets encompassing a wide range of scenarios, weather conditions, and geographical regions. The most common approach involves using a single, comprehensive model that attempts to generalize across all possible driving conditions. Monolithic models such as YOLO (You Only Look Once), Faster R-CNN (Regionbased Convolutional Neural Networks), and SSD (Single Shot MultiBox Detector) have been widely adopted in autonomous driving systems. These models are designed to process the entire input image through a single, unified network. They have demonstrated substantial performance in typical driving scenarios, achieving real-time processing speeds and acceptable accuracy rates. Some Examples of popular models include: YOLO (You Only Look Once) is known for its speed and efficiency, as it processes images in a single pass through the network. This makes it suitable for real-time applications, such as autonomous driving. However, YOLO's performance can degrade in complex scenes with low lighting or adverse weather conditions. Faster R-CNN is a two-stage detector that first proposes regions of interest and then classifies and refines these regions. It is highly accurate and widely used in research and commercial applications. Despite its accuracy, Faster R-CNN can be computationally intensive, which limits its deployment in resource-constrained environments like autonomous vehicles. SSD (Single Shot MultiBox Detector) strikes a balance between speed and accuracy by using a single network to predict multiple bounding boxes and class scores. It is less computationally intensive than Faster R-CNN but still faces challenges in handling complex driving scenarios and diverse environmental conditions. In recent years, the Vision Transformer (ViT) model family has emerged as a significant advancement in image processing and object detection, offering an alternative to traditional CNN-based approaches. ViT models, including various adaptations and improvements, utilize a transformer-based architecture that treats images as sequences of fixed-size patches (tokens). In summary, while prior art scene classification for autonomous vehicles has made significant advancements, it remains constrained by the limitations of monolithic models, computational demands, and the static nature of training data. These limitations necessitate the development of more adaptive, specialized, and continuously improving systems to ensure the safety and reliability of autonomous driving technology. The primary issues associated with prior art solutions in autonomous vehicle perception systems are multifaceted, reflecting both technical and operational shortcomings. These problems significantly impact the reliability and safety of autonomous driving technology. Mainly, pre-trained CNNs or ViT models, trained on large datasets, are used to extract global embeddings from sensor data. These models are fine-tuned to extract feature embeddings. SOTA models based on ViT are computationally expensive and have high memory usage. Also due to the model complexity, the interpretation and explainability of such models are a drawback. To apply such models using fine-tuning techniques, the risk of overfitting is high, if the dataset is rare and small and contains critical scenes such as bad weather conditions. Inference time of such models cannot be suitable for real-time applications. Monolithic models in prior art must generalize across a diverse range of driving conditions, leading to compromises in accuracy. While these models perform adequately in standard scenarios, they often struggle in specific or challenging situations such as night -time driving, adverse weather conditions (like rain, snow, or fog), and unusual traffic patterns. For example, a model optimized for clear, daylight conditions may not accurately detect pedestrians or obstacles in low -light or high -glare environments, potentially leading to critical failures. Autonomous vehicles operate with limited computational resources. The large, monolithic models used in traditional systems require substantial processing power and memory. This can create performance bottlenecks, especially when real -time processing is crucial. The need to balance model complexity with computational feasibility often results in reduced model accuracy and slower response times. Consequently, the vehicle's ability to process visual data quickly and accurately in dynamic environments is compromised. Prior art systems typically use a one -size -fits -all approach, where a single model is tasked with handling all possible driving scenarios. This lack of specialization means that the model is not particularly optimized for any specific condition. Critical situations, such as navigating through heavy rain at night or dealing with unusual traffic patterns, require specialized handling to ensure safety and reliability. However, treating all scenarios equally without prioritizing challenging cases leads to inadequate performance where precise detection is most needed. Traditional systems rely on static training datasets collected during driving sessions. These datasets are often not comprehensive enough to cover all possible driving scenarios, particularly rare or challenging ones. The lack of focus on specific challenging cases means that models do not learn or adapt to these scenarios effectively. Over time, this static approach results in a plateau in performance, where the system fails to improve and cannot handle new or unforeseen situations adequately. Real-world incidents have highlighted the critical shortcomings of current perception systems. A notable example is the tragic incident involving Elaine Herzberg [https: / / en.wikipedia.org / wiki / Death_of_Elaine_Herzberg], who was struck by an Uber test vehicle at night. The vehicle's perception system failed to detect her as she crossed the street, demonstrating a significant failure in low-light conditions. This incident underscores the inability of monolithic models to handle specific, challenging scenarios effectively. It reveals the urgent need for systems that can dynamically adapt and specialize in real-time to prevent such tragedies. Finally, the following additional problem might be identified: Environmental Variability: Traditional models may not perform consistently across different geographical locations with varying environmental conditions. For instance, a model trained predominantly on urban data may not perform well in rural or mountainous areas. Overfitting: In some cases, monolithic models trained on specific datasets may overfit to the conditions represented in those datasets, leading to poor generalization when faced with new or different driving conditions. In summary, prior art solutions in autonomous vehicle perception systems are hindered by their need to generalize across diverse conditions, leading to compromises in accuracy. Computational constraints further exacerbate these issues, necessitating trade-offs that impact real -time performance. The lack of specialization and reliance on static training data prevent traditional systems from effectively handling challenging scenarios and continuously improving. Hence, there is a need to provide an improved method and system for adaptive scene identification, recognition, and classification for autonomous navigation. This need may be satisfied by the subject-matter of the appended independent claims. The appended dependent claims address optional embodiments of the present disclosure. According to a first aspect of the disclosure, there is provided a method for dynamic recognition of navigation scenes in autonomous navigation, the method comprising obtaining, by a machine learning model with multiple heads trained on respective navigation scenes, patch embeddings of an input image; obtaining, by the machine learning model, a class token that aggregates information for all the patch embeddings to capture a global context of a navigation scene of the autonomous navigation; obtaining, by the machine learning model, a projected class token by projecting the class token into a latent space; obtaining, a similarity score, between the projected class token and reference class tokens in a dataset, wherein the reference class tokens are associated with respective navigation scenes; and obtaining, based on the similarity score, a navigation scene. The technical effects of the disclosed method for adaptive recognition of navigation scenes in autonomous navigation encompass: i) Enhanced scene understanding: by obtaining patch embeddings of an input image, the method allows for detailed and localized feature extraction, improving the understanding of different parts of the scene. Further, by aggregating information from all patch embeddings into a class token, the global context of the navigation scene is captured, facilitating a comprehensive understanding of the entire scene, ii) Improved classification accuracy: projecting the class token into a latent space helps in transforming the aggregated information into a more discriminative representation, enhancing the model's ability to differentiate between various navigation scenes. In addition, determining or obtaining a similarity score between the projected class token and reference class tokens ensures that the classification is based on a quantitative measure of similarity, improving accuracy, iii) Adaptive model selection: obtaining a navigation scene based on the similarity score (e.g. selecting the navigation scene associated with the maximum similarity score, and hence selecting the corresponding machine learning model head trained on the selected navigation scene) ensures that the most relevant model head is used for recognition, enhancing the reliability of the results. This also ensures that the recognition results outputted by said model head are tailored to the specific navigation scene, improving the robustness and relevance of the recognition process. Overall, these technical effects contribute to a more accurate, adaptive, and reliable system for dynamic recognition of navigation scenes in autonomous navigation, enhancing the system's ability to navigate complex environments effectively. In embodiments, obtaining, based on the similarity score, the navigation scene may comprise obtaining the navigation scene that is associated with a highest similarity score. In embodiments, the method for adaptive recognition of navigation scenes in autonomous navigation may further comprise selecting the machine learning model head trained on the obtained navigation scene; and may comprise generating, using the selected machine learning model head, recognition results. In embodiments, obtaining, based on the similarity score, the navigation scene may comprise: determining whether the similarity score exceeds a predetermined threshold; based on a determination that the similarity score exceeds the predetermined threshold: obtaining a navigation scene that is associated with a highest similarity score; selecting the machine learning model head trained on the obtained navigation scene. In embodiments, based on the determination that the similarity score exceeds the predetermined threshold: the method may further comprise generating, using the selected machine learning model head, recognition results. In embodiments, obtaining, based on the similarity score, the navigation scene may further comprise: based on a determination that the similarity score does not exceed the predetermined threshold: obtaining at least two navigation scenes that are associated with the highest and subsequent highest similarity scores, and selecting machine learning model heads trained on the obtained at least two navigation scenes. In embodiments, based on the determination that the similarity score does not exceed the predetermined threshold: the method may further comprise generating, using the selected machine learning model heads, respective recognition results, and combining said respective recognition results. Obtaining at least two navigation scenes may involve identifying at least two navigation scenes that have the highest and subsequent highest similarity scores with the input image. This step ensures that the system considers multiple potential matches, enhancing the robustness of the recognition process. In addition, by leveraging multiple model heads, the system can utilize specialized knowledge from different scenes, improving the accuracy of the recognition. Further, using the selected model heads, the system generates recognition results for each of the top two navigation scenes. This may be performed using parallel processing and allows the system to gather multiple perspectives on the input image. The system combines the respective recognition results from the (e.g. at least two) machine learning model heads. This combination can be done through various methods, such as averaging, voting, or fusion techniques, to produce a final, more accurate recognition result. Examples of combining the recognition results include: for an object detection and / or recognition task, a Non-Maximum Suppression (NMS) technique can be applied to combine bounding boxes of two or more heads of the machine learning model; a Weighted box fusion (WBF) technique can be used to give more weight to the heads with the highest similarity score; in the case of image segmentation, a pixel-wise majority vote or weighted averaging can be applied to improve accuracy of detected classes. These steps collectively enhance the system's ability to handle ambiguous or complex navigation scenes by considering multiple potential matches and integrating their recognition results, leading to improved performance and reliability in autonomous navigation. In embodiments, obtaining, based on the similarity score, the navigation scene may further comprise: based on the determination that the similarity score does not exceed the predetermined threshold: recording sensor data and / or environmental condition data of the autonomous navigation; and adding said data to a dataset to be used for retraining the multiple heads. By capturing detailed sensor data (e.g., from cameras, LiDAR, radar, GPS) and / or environmental condition data (e.g., weather, lighting, road conditions), the system gathers comprehensive information about the current navigation scenario. This enriched dataset provides a more accurate representation of real-world conditions. The recorded data is added to a dataset that is used for retraining the existing model heads. This continuous addition of new data ensures that the machine learning models are regularly updated with the latest information, improving their ability to recognize and adapt to new and evolving navigation scenes. Using the new data to retrain the multiple heads of the machine learning model enhances their robustness and accuracy. The models become better at recognizing a wider variety of navigation scenes, reducing the likelihood of misclassification. The method's ability to adapt based on the similarity score determination ensures that the system can dynamically respond to different levels of confidence in scene recognition. This adaptive approach improves the overall reliability and effectiveness of the autonomous navigation system. These technical effects collectively contribute to a more adaptive, accurate, and reliable system for recognizing navigation scenes in autonomous navigation, enhancing its performance in real-world conditions. In embodiments, combining said (e.g. at least two) recognition results may comprise using at least one of averaging, weighted averaging, voting, majority voting, weighted voting, non-maximum suppression, weighted box fusion, pixel-wise majority voting, pixel-wise weighted averaging, and fusion techniques, to generate a combined, e.g. more accurate, recognition result. In embodiments, the machine learning model may be a vision transformer. In embodiments, obtaining, by said machine learning model, the patch embeddings of the input image may comprise segmenting the input image into non-overlapping patches, and passing said patches through a linear layer of the model. In embodiments, projecting the class token into a latent space may comprise transforming the class token into the latent space using cross-attention mechanisms within the machine learning model. In embodiments, the similarity score may be determined using at least one of cosine similarity, Euclidean distance, L1 distance, Jaccard similarity, Pearson correlation coefficient, and machine learning models. In embodiments, the predetermined threshold may be obtained by using a validation dataset to test various threshold values and select the one that maximizes the machine learning model's recognition accuracy of navigation scenes. In embodiments, the recognition results comprise at least one of navigation scene types, road types, traffic sign types, obstacle types, object types, lane markings, weather conditions, lighting conditions, vehicle types, pedestrian types, road surface conditions, construction zones, animal presence, tunnel types, terrain types, urban vs. rural areas, traffic congestion levels, school zone indicators, and wildlife crossing alerts. According to a second aspect of the present disclosure, there is provided a computer program comprising instructions which, when the computer program is executed by a computer, cause the computer to carry out the method for adaptive recognition of navigation scenes in autonomous navigation, according to the first aspect of the disclosure. According to a further aspect of the disclosure, there is provided a computer-readable data carrier having stored thereon the computer program according to the second aspect of the disclosure. According to a further aspect of the disclosure, there is provided an apparatus comprising: one or more interfaces for communication; a memory; and a data processing circuit configured to carry out the method for adaptive recognition of navigation scenes in autonomous navigation, according to the first aspect of the disclosure. Examples will now be further described with reference to the figures in which: Fig. 1 shows a flow diagram illustrating an embodiment of a computer-implemented method 100 for adaptive recognition of navigation scenes in autonomous navigation. Fig. 2A shows a flow diagram illustrating an embodiment of a computer-implemented method 200 for adaptive recognition of navigation scenes in autonomous navigation. Fig. 2B shows a flow diagram illustrating an embodiment of further optional steps related to obtaining recognition results. Fig. 3 is a diagram representing an embodiment of the detection, recognition and classification system implementing methods 100 and 200. Fig. 4 is a diagram representing an embodiment of the general structure of the input and output of a transformer model used as the machine learning model in methods 100 and 200. Fig. 5 is a flow diagram of an embodiment of a recognition method that can handle both in-distribution and out-of-distribution in input data of autonomous navigation. Fig. 6 schematically illustrates a block diagram of an embodiment of an apparatus 600 to execute the methods described herein. Detailed Description The invention seeks to address several specific drawbacks of the prior art in scene classification systems for autonomous vehicles. Inadequate Performance in Specific Scenarios: Prior art systems often struggle with accurately classifying scenes in challenging or specific scenarios using a single baseline. For instance, night-time driving, adverse weather conditions (such as heavy rain, snow, or fog), and unusual traffic patterns pose significant challenges. Traditional models, designed to handle a wide range of conditions, frequently exhibit decreased accuracy in these difficult environments. This limitation can lead to critical failures, such as the inability to detect pedestrians in low-light conditions or misidentifying obstacles in adverse weather. Generalization versus Specialization: The invention addresses the fundamental issue of generalization versus specialization. Traditional models use a single, comprehensive network that attempts to generalize across all driving conditions. While this approach ensures a baseline performance across various scenarios, it often results in suboptimal accuracy for specific conditions. For example, a model trained to perform adequately in daylight may not have the understanding needed for rainy nighttime driving. By focusing on specialized detection and segmentation heads tailored to specific scene groups, the invention significantly improves accuracy where it is most needed, ensuring more reliable performance in diverse and challenging conditions. Dynamic Adaptability: One major drawback of prior art systems is their static nature. Traditional models do not dynamically adapt to changing driving conditions in real-time. This lack of adaptability means that the model's performance can degrade when transitioning between different environments, such as moving from a well-lit urban street to a dark tunnel or from a clear day to a foggy night. The invention addresses this issue by introducing a system that dynamically switches between different detection heads based on the real-time classification of the driving scene. This dynamic adaptability ensures that the most appropriate detection head is used, maintaining high accuracy and reliability across varying conditions. Continuous Improvement: Traditional systems typically rely on static training datasets collected during driving sessions. These datasets may not adequately represent rare or unique scenarios, leading to performance gaps in real-world applications. Once deployed, these models do not inherently improve or learn from new data. The invention seeks to remedy this by introducing a mechanism for continuous improvement. By employing a latent space metric to identify rare or unique scenes, the system can trigger a recording function to capture these scenarios. The recorded data is then added to an actively expanding training set, ensuring that the system continuously learns and improves over time. This approach addresses the issue of static training data and enhances the model's performance by incorporating new and challenging scenarios into the training process. Detailed Breakdown of some of the Problems Addressed by the Invention: Night-Time Driving: Traditional models often fail to accurately detect pedestrians, cyclists, or other vehicles in low-light conditions. The invention's specialized night-time detection head improves accuracy in these scenarios. Adverse Weather Conditions: Conditions such as heavy rain, snow, or fog can obscure vision and confuse traditional models. The invention includes detection heads specifically trained for these environments, ensuring better performance. Unusual Traffic Patterns: Infrequent or unexpected traffic scenarios, such as sudden roadblocks or atypical vehicle behavior, can be challenging for generalized models. The invention's scene classification and adaptability address these issues more effectively. Dynamic Scene Changes: Environments that rapidly change, such as entering or exiting tunnels, can lead to significant performance drops in static models. The invention's dynamic switching between detection heads ensures consistent accuracy. Underrepresented Scenarios in Training Data: Traditional models trained on static datasets may not perform well in rare or unique scenarios. The invention's continuous improvement mechanism, which records and integrates new data, ensures ongoing enhancement of detection capabilities. By addressing these specific drawbacks, the invention provides a more robust, adaptive, and continuously improving solution for object detection and segmentation in autonomous vehicles, significantly enhancing their safety and reliability across a wide range of driving conditions. Fig. 1 shows a flow diagram illustrating an embodiment of a computer-implemented method 100 for adaptive classification of navigation scenes in autonomous navigation. Step 110 of method 100 comprises obtaining, by a machine learning model with multiple heads trained on respective navigation scenes, patch embeddings of an input image. The machine learning model may be at least on of Vision Transformer (ViT), which is a deep learning model that processes images by dividing them into patches, embedding these patches, and using a Transformer architecture to capture relationships between patches for comprehensive image representation; a Convolutional Neural Network (CNN), which utilizes convolutional layers to detect features like edges, shapes, and textures, making it suitable for image recognition; a Residual Network (ResNet), which is a type of CNN, use skip connections to improve training of deep networks; an Inception Network (also known as GoogleNet), which uses multiple convolutional filters of different sizes to capture various features at different scales; an EfficientNet, which is another CNN variant that balances network depth, width, and resolution to achieve high performance with fewer parameters; and a Generative Adversarial Network (GAN) that enhances image recognition by generating high-quality synthetic images for training. For instance, in the Vision Transformer (ViT), the "head" refers to the final layer or set of layers that are responsible for producing the model's output, such as classifying an image. After the Transformer processes the sequence of patch embeddings through multiple layers of self-attention and feed-forward networks, the output embeddings are passed to the head. This head typically consists of a linear layer (or layers) that maps the processed embeddings to the desired output, such as class probabilities in the case of image classification. The head effectively translates the rich, high-dimensional representation learned by the Transformer into a format suitable for the specific task at hand. In a machine learning model with multiple heads trained on respective navigation scenes, each head may be designed to specialize in a different aspect or type of navigation task. These heads may share a common backbone network that extracts general features from the input data (e.g. images), but each head may have its own set of parameters and may be trained on a specific subset of the data relevant to its task. This allows the model to learn and optimize for various navigation scenarios and / or scenes simultaneously, improving its overall performance and versatility by leveraging the specialized knowledge of each head while maintaining a unified, efficient architecture. The navigation scene may comprise at least one of the following: snowy scenes, rainy scenes, foggy scenes, night scenes, sunny or clear weather scenes, urban environments, rural or countryside areas, desert landscapes, mountainous terrains, coastal or marine settings, forest or jungle areas, icy or frozen landscapes, mixed weather conditions such as thunderstorms or windy environments, and tunnel scenes. In embodiments, a machine learning model head may be trained and / or be specialized on each of these scenes, thereby enabling the autonomous navigation to account for each of said scenes and hence ensure accurate and reliable performance. For instance, the machine learning model may process an input image by first dividing it into fixed-size patches, for instance 16x16 pixels, transforming the image into a grid of smaller sections. Each patch may then be flattened into a one-dimensional vector, such as a 16x16 patch with 3 color channels (RGB) becoming a vector of length 768. These vectors are passed through a linear layer to create patch embeddings, converting each vector into a higher-dimensional space to capture more complex features. In embodiments, positional encodings may be added to each patch embedding to provide spatial information, forming a sequence similar to the token sequence in natural language processing. This sequence may be fed into a standard Transformer model, which uses self-attention mechanisms to capture relationships between patches. After processing through multiple Transformer layers, the model may generate a comprehensive representation of the input image, which can be used for tasks like image classification, object detection, or segmentation. Training a machine learning model with multiple heads trained on respective navigation scenes may involve the following step: Gathering a diverse dataset that includes various navigation scenes such as snowy, rainy, foggy, night, urban, rural, and more. Cleaning and preprocessing the data to ensure consistency and quality, including handling missing values and normalizing features. Labeling the data to indicate the specific navigation scene each sample belongs to. This step is essential for training the model heads to specialize in their respective scenes. Designing a model architecture with a shared backbone network for feature extraction and multiple heads, each dedicated to a specific navigation scene. The backbone network will learn general features, while each head will specialize in the unique characteristics of its assigned scene. Training the shared backbone network on the entire dataset to learn general features that are useful across all navigation scenes. This step ensures that the backbone can extract relevant features from any input image. For each head, using the data corresponding to its specific navigation scene to fine-tune the head. This involves training each head on its subset of the data, allowing it to learn the specialized features and patterns unique to its scene. Validating the performance of each head on a validation set specific to its navigation scene. Adjusting hyperparameters such as learning rate, batch size, and the number of epochs to optimize performance. Integrating the trained heads with the shared backbone and test the complete model on a diverse test set that includes all navigation scenes. This step ensures that the model can accurately switch between heads and perform well across different scenarios. Evaluating the model's performance using metrics such as accuracy, precision, recall, and F1 score. By following these steps, the model can effectively learn to handle a wide range of navigation scenes, leveraging the specialized knowledge of each head while maintaining a unified and efficient architecture. Step 115 of the method 100 comprises obtaining, by the machine learning model, a class token that aggregates information for all the patch embeddings to capture a global context of a navigation scene of the autonomous navigation. In embodiments, the class token may be a token added to the sequence of patch embeddings, for instance in a Vision Transformer (ViT) model. The class token may be designed to aggregate information from all the patch embeddings, thereby capturing a global context of the navigation scene. During the model's processing, the class token interacts with the patch embeddings through the Transformer's self-attention mechanisms, accumulating information from the entire input image. By the end of the Transformer's layers, the class token contains a comprehensive representation of the navigation scene, which can then be used for classification purposes in autonomous navigation. In embodiments, the class token may be a class token of a Vision Transformer (ViT) that may be generated and used as follows: A class token may be initialized as a learnable parameter, typically a vector of the same dimension as the patch embeddings. This token may be prepended to the sequence of patch embeddings, resulting in a sequence with (N + 1) embeddings if there are (N) patches, with the class token at the beginning. Positional encodings may be added to the entire sequence, including the class token, to retain spatial information about the patches. The sequence, including the class token, may then be passed through multiple layers of the Transformer, each consisting of self-attention and feed-forward sub-layers. During the self-attention mechanism, the class token may interact with all other patch embeddings, aggregating information from the entire sequence and effectively capturing a global context of the image. After passing through all Transformer layers, the class token contains a comprehensive representation of the input image, which may then be used fordownstream tasks, such as classification, for instance by passing it through a final linear layer or other task-specific heads. This process allows the class token to gather and encapsulate information from all patches, providing a global understanding of the image for classification purposes. In embodiments, the class token may be denoted as [CLS] token. It may be a learnable embedding introduced at the beginning of the sequence of patch embeddings in a Vision Transformer (ViT). It may have the same dimension as the patch embeddings to ensure compatibility with the transformer model's architecture. For instance, if the patch embeddings are of size D, the [CLS] token will also have size D, where D represents the feature space dimension (e.g., 768 or 1024). Each image may be divided into patches, and each patch may be flattened and passed through a linear projection to obtain a patch embedding of size D. These patch embeddings represent individual patches of the image. After dividing the image into patches, the [CLS] token and patch embeddings are concatenated, forming an input sequence to the transformer, with N+1 tokens (1 for the [CLS] token and N for the patches), all having the same size D. The [CLS] token aggregates information from all patches through the self-attention mechanism in the transformer, capturing global features by attending to all patch embeddings. After passing through the transformer layers, the final state of the [CLS] token serves as the global representation of the image for downstream tasks like classification. Both the [CLS] token and patch embeddings are embeddings. The [CLS] token serves to represent a global aggregation of information, while the patch embeddings represent local features of the image. In embodiments, the class token may be added to the sequence of patch embeddings. The class token may act as a "global representative" of the entire image (or scene). This token may aggregate information from all the patches in the image and may capture global context. The class token may learn to capture a high-level representation of the entire image, incorporating information from all the patches, and may be used fortasks like classification or other high-level decision-making processes (e.g., navigation, object detection). In autonomous navigation, this class token would represent the global context of a scene, which could include navigation scene type (night, day, tunnel, snow, rain, etc.), obstacles, roads, lanes, and other important features for decision-making. In embodiments, once the class token is generated and aggregated e.g. through the transformer layers, it can be projected into a latent space. This latent space may be a lower-dimensional space where the model can more effectively interpret the high-level features and / or relationships within the data. Latent space projection may involve applying learned transformation (e.g., a fully connected layer, a non-linear activation function, or another form of dimensionality reduction). This allows the model to capture the most relevant features of the navigation scene in a compact form that can be used for further downstream tasks, such as navigation scene recognition, route planning, object detection, or path optimization. The projected class token may represent an abstract, and / or compressed version of the navigation scene information, encoded in the latent space, and could be used for decision-making or further refinement in the context of the autonomous navigation system. Step 120 of method 100 comprises obtaining, by the machine learning model, a projected class token by projecting the class token into a latent space. Obtaining a projected class token involves taking the class token, which has already aggregated information from all patch embeddings, and mapping it or projecting it into a latent space. This projection or mapping may be done using a linear projection layer, which transforms the class token into a new vector representation within a higher-dimensional latent space. This projection helps to capture more abstract and complex features of the input data, enhancing the model's ability to perform downstream tasks such as classification. By projecting the class token into this latent space, the model can leverage the rich, global context encapsulated by the class token in a more effective and nuanced manner for further processing and decision-making. In embodiments, the projection of the class token into a latent space may be achieved through a linear transformation process. For instance, initially, the class token, which has aggregated information from all patch embeddings, may be passed through a linear projection layer. This layer may consist of a matrix of learnable weights that multiplies the class token vector, effectively transforming it into a new vector representation. This transformation maps the class token from its original feature space into a higher-dimensional latent space, allowing the model to capture more abstract and complex features. The linear projection layer may also include a bias term, which is added to the resulting vector to further refine the transformation. This projected class token, now in the latent space, encapsulates a richer and more nuanced representation of the input data, enhancing the model's ability to perform downstream tasks such as classification with greater accuracy and effectiveness. Step 125 of method 100 comprises obtaining, a similarity score, between the projected class token and reference class tokens in a dataset, wherein the reference class tokens are associated with respective navigation scenes. In embodiments, obtaining a similarity score between the projected class token and reference class tokens involves comparing the projected class token, which may encapsulate the global context of the current navigation scene, with reference class tokens that may represent various predefined navigation scenes in a dataset. This comparison may be done using a similarity metric such as cosine similarity, which measures the cosine of the angle between two vectors in a multi-dimensional space and determines a similarity score. In embodiments, the similarity score may be obtained or determined using at least one of cosine similarity, Euclidean distance, L1 distance, Jaccard similarity, Pearson correlation coefficient, and machine learning models. For example, obtaining said similarity score may comprise calculating the dot product of the projected class token and each reference class token, and, for instance, dividing by the product of their magnitudes. The resulting similarity score indicates how closely the projected class token matches each reference class token, with higher scores signifying greater similarity. This step helps in identifying the most relevant navigation scene by comparing the current scene's global context with known scenes corresponding to the reference class tokens of the dataset, facilitating accurate classification and decision-making in autonomous navigation systems. In embodiments, the reference class tokens may be embeddings that may have been previously determined for each navigation scene and saved in the dataset. These embeddings may encapsulate the global context of various predefined navigation scenes, such as snowy, rainy, foggy, or urban environments (refer to the navigation scene defined above). When obtaining the similarity score, the projected class token from the current scene is compared against these reference class tokens to find the closest match. This comparison helps the model accurately classify the current navigation scene by leveraging the rich, contextual information stored in the reference embeddings. Step 130 of method 100 comprises obtaining, based on the similarity score, a navigation scene. In embodiments obtaining, based on the similarity score, the navigation scene may comprise obtaining the navigation scene that is associated with a highest similarity score. For instance, the navigation scene with the highest similarity score may be obtained (in this disclosure the word obtained may mean at least one of selected, calculated, determined, generated, computed, and received), and the method may select (or switch to, or switch from a current head to) the corresponding (e.g. specialized) trained machine learning model head, this head may be used to process the input data (e.g. input images) to generate (e.g. accurate and relevant) (e.g. object) recognition results or outcomes. Since the selected machine learning model head may be trained to handle the specific characteristics and / or autonomous system (e.g. ego-vehicle) requirements and / or environmental conditions / requirements of the identified / obtained navigation scene, it ensures that the recognition results are tailored to the characteristics and / or autonomous system (e.g. autonomous vehicle) requirements and / or environmental conditions / requirements of said scene with the highest similarity score, thereby enhancing the overall performance and reliability of the autonomous navigation system (or autonomous system). In embodiments, the method of adaptive recognition of navigation scenes discussed above may further comprise selecting the machine learning model head trained on the obtained navigation scenes. Since the a machine learning model has multiple heads trained on respective navigation scenes, the model head trained on the navigation scene associated with the maximum similarity score may be obtained, and may be used to generate recognition results, that may be most relevant to the identified navigation scenes, and hence enhance the model’s recognition accuracy. In embodiments, the method of adaptive recognition of navigation scenes discussed above may further comprise generating, using the selected machine learning model head, recognition results. For instance, generating said recognition results may comprise detecting, identifying and classifying objects (e.g. including persons, animals, obstacles, drones, vehicles, holes, bumps, traffic signs, etc.) within the navigation scene and / or input image. For example, generating said recognition results may include generating bounding boxes around detected objects to indicate their locations and assigning class labels to each object to specify what they are. For instance, in the present autonomous navigation context, the recognition results might identify pedestrians, vehicles, traffic signs, and other relevant objects within the scene. Additionally, the recognition results can include confidence scores that indicate the model's certainty about each (object) recognition result, helping to prioritize and make decisions based on the most reliable information. This comprehensive output enables the autonomous system to understand and interact with its environment effectively. In embodiments, the recognition results may be used for controlling and / or navigating an autonomous system. For instance, as an autonomous vehicle travels on a highway, the method uses the model head trained on the highway scene, and generates recognition results like open road, lane markings, and surrounding traffic to control the vehicle to stay within the recognized lane markings or not to collide with surrounding traffic. Upon approaching a tunnel, the system detects the change in environment, such as reduced lighting and different road surface textures. The method triggers the model to switch to the head trained for tunnel navigation. This head generates recognition results (e.g. reduced visibility) that are used to control and / or navigate the vehicle, for instance the vehicle's speed may be adjusted to account for the reduced visibility, turns on the headlights, and ensures lane discipline despite the altered visual conditions. By continuously analyzing the environment and updating its navigation strategy based on real-time recognition results, the vehicle safely transitions from the open highway to the enclosed tunnel. For instance, while driving on a sunny day, the model head trained on a sunny day scene may be selected and recognition results may be obtained by said head and may be used to control navigation by identifying road signs, lane markings, and other vehicles with ease. When the weather changes to rain, the system detects the reduced visibility, reflections on the wet road, and the presence of rain droplets on the sensors. The method switches to the head trained for rainy conditions. This head generate recognition results that are used to adjust the vehicle's speed to ensure safe driving, activates the windshield wipers, and enhances sensor sensitivity to maintain accurate detection of road features and obstacles. These adjustments help the vehicle navigate safely despite the challenging weather conditions. Fig. 2A shows a flow diagram illustrating an embodiment a computer-implemented method 200 for adaptive recognition of navigation scenes in autonomous navigation. Steps 210 to 225 of method 200 are the same as steps 110 and 125 of method 100. The steps and / or features of method 200 may be combined with the steps and / or features of method 100. Method 200 may comprise step 230: determining whether the similarity score exceeds a predetermined threshold. The predetermined threshold may be determined through a process of empirical evaluation and optimization. This may involve using a validation dataset to test various threshold values and selecting the one that best balances the trade-offs between false positives and false negatives. The goal may be to find a threshold that maximizes the model's performance metrics, such as accuracy, precision, recall, or the F1 score. This process may include techniques like cross-validation, where the dataset or reference class tokens may be divided into multiple subsets, and the machine learning model (e.g. ViT) may trained and validated on different combinations of these subsets to ensure robustness. The chosen threshold may be the one that consistently provides the best performance across these evaluations, ensuring that the model can accurately distinguish between in-class and out-of-class scenarios. Method 200 may comprise step 235: based on a determination that the similarity score exceeds a predetermined threshold: obtaining a navigation scene that is associated with a highest similarity score. For instance, when it is determined that (or if) the similarity score exceeds a predetermined threshold, the navigation scene that is associated with to the highest similarity score is obtained. This scene is identified by comparing the projected class token with reference class tokens in the dataset, each representing different navigation scenes. Method 200 may comprise Step 240: based on a determination that the similarity score exceeds a predetermined threshold: selecting the machine learning model head trained on the obtained navigation scene. For instance, when it is determined that (or if) the similarity score exceeds a predetermined threshold, after identifying the navigation scene with the highest similarity score, the model selects (or switches to, or switches from a current head to) the corresponding head that is trained to e.g. handle the unique characteristics and / or autonomous system (e.g. autonomous vehicle) requirements and / or environmental conditions / requirements of that particular navigation scene with the highest similarity score. Method 200 may further comprise step 245: based on a determination that the similarity score exceeds a predetermined threshold: generating, using the selected machine learning model heads, recognition results, wherein the recognition results are used for controlling an autonomous system. Examples of said recognition results include at least one of: bounding boxes for an object detection recognition task, semantic segmentation masks in the case of image segmentation, and a depth map for depth estimation. The navigation system may be an ego-vehicle, a drone, a submarine, a robot, an autonomous system, and / or a virtual reality object. In embodiments, the recognition results may comprise recognition of at least one of navigation scene types, road types, traffic sign types, obstacle types, object types, lane markings, weather conditions, lighting conditions, vehicle types, pedestrian types, road surface conditions, construction zones, animal presence, tunnel types, terrain types, urban vs. rural areas, traffic congestion levels, school zone indicators, and wildlife crossing alerts. In embodiments, generating, using the selected machine learning model head, recognition results may comprise generating, using said head, recognition results (e.g. object detection, classification, and recognition) based on the input image. For instance, if its determined that (or if) the similarity score exceeds a predetermined threshold, after identifying the navigation scene with the highest similarity score, and selecting (or switching to, or switching from a current head to) the corresponding (e.g. specialized) trained machine learning model head, this head may be used to process the input data to generate (e.g. accurate and relevant) (e.g. object) recognition results or outcomes. Since the selected machine learning model head may be trained to handle the specific characteristics and / or autonomous system (e.g. ego-vehicle) and / or environmental conditions / requirements of the identified / obtained navigation scene, it ensures that the recognition results are tailored to the characteristics and / or autonomous system (e.g. autonomous vehicle) requirements and / or environmental conditions / requirements of said scene with the highest similarity score, thereby enhancing the overall performance and reliability of the autonomous navigation system (or autonomous system). For instance, generating said recognition results may comprise detecting, identifying and classifying objects (e.g. including persons, animals, obstacles, drones, vehicles, holes, bumps, traffic signs, etc.) within the navigation scene and / or input image. For example, generating said recognition results may include generating bounding boxes around detected objects to indicate their locations and assigning class labels to each object to specify what they are. For instance, in the present autonomous navigation context, the recognition results might identify pedestrians, vehicles, traffic signs, and other relevant objects within the scene. Additionally, the recognition results can include confidence scores that indicate the model's certainty about each (object) recognition result, helping to prioritize and make decisions based on the most reliable information. This comprehensive output enables the autonomous system to understand and interact with its environment effectively. In embodiments, recognition results may include semantic segmentation results. The semantic segmentation results may involve detecting, identifying, and classifying various regions within the navigation scene and / or input image. For example, generating these segmentation results may include delineating precise boundaries around detected regions to indicate their locations and assigning class labels to each region to specify what they represent. In the context of autonomous navigation, the segmentation results might identify and differentiate between pedestrians, vehicles, traffic signs, road surfaces, buildings, trees, animals, bicycles, motorcycles, buses, trucks, traffic lights, sidewalks, crosswalks, lane markings, potholes, bumps, curbs, fences, poles, benches, trash cans, mailboxes, hydrants, and other relevant elements within the scene. Additionally, the segmentation results can include confidence scores that indicate the model's certainty about each segmented region, aiding in prioritizing and making decisions based on the most reliable information. In embodiments, method 200 may further comprise the step: based on a determination that the similarity score does not exceed the predetermined threshold: obtaining 250 at least two navigation scenes that are associated with a highest and subsequent highest similarity scores. For instance, when it is determined that, or if, the similarity score does not exceed the predetermined threshold, after comparing the projected class token with the reference class tokens in the dataset, the model identifies at least two navigation scenes with the highest (i.e. first highest, immediate second / subsequent highest, immediate third / subsequent highest, etc.) similarity scores. These scenes may then be used to further analyze and understand the current navigation context, ensuring that the model considers multiple potential scenarios to enhance its decision-making and accuracy in complex environments. Fig. 2B shows a flow diagram illustrating an embodiment of further steps of the computer-implemented method 200 for adaptive recognition of navigation scenes in autonomous navigation. In embodiments, method 200 may further comprise the step: based on a determination that the similarity score does not exceed the predetermined threshold: selecting 255 (e.g. at least two) machine learning model heads trained on the obtained (e.g. respective) at least two navigation scenes. Based on a determination that, or if, the similarity score does not exceed the predetermined threshold, the method may involve selecting the machine learning model heads trained on the obtained at least two navigation scenes. Hence, after identifying at least two navigation scenes with the highest similarity scores, the model chooses the corresponding specialized heads for each of these scenes. These heads, each trained to handle specific characteristics and challenges of their respective scenes, are then used to process the input data. By leveraging multiple specialized heads, the model can generate more accurate and robust recognition results, ensuring reliable performance even in complex and dynamic environments. In embodiments, method 200 may further comprise the step: based on a determination that the similarity score does not exceed the predetermined threshold: generating 260, using the selected machine learning model heads, respective recognition results. In embodiments, generating, using the selected (e.g. at least two) machine learning model heads, respective (e.g. at least two) recognition results may comprise generating, using each head of said at least two heads, recognition results (e.g. object detection, classification and recognition) by each head based on the input image. For instance, generating said recognition results may comprise detecting, identifying and classifying objects (e.g. including persons, animals, obstacles, drones, vehicles, holes, bumps, traffic signs, etc.) within the input image using each of the at least two machine learning model heads. For example, generating said recognition results may include generating bounding boxes around detected objects to indicate their locations and assigning class labels to each object to specify what they are. For instance, in the present autonomous navigation context, the recognition results might identify pedestrians, vehicles, traffic signs, and other relevant objects within the navigation scene and / or input image. Additionally, the recognition results can include confidence scores that indicate the model's certainty about each (object) recognition result, helping to prioritize and make decisions based on the most reliable information. This comprehensive output enables the autonomous system to understand and interact with its environment effectively. In embodiments, when the similarity score does not exceed the predetermined threshold, it means the input image might not clearly match a single known navigation scene in the dataset. Instead, it could be similar to multiple scenes. In this case, at least the top two navigation scenes that have the highest similarity scores with the input image may be selected, as well as the corresponding machine learning model heads that are / were trained on these at least top two navigation scenes. Each of the selected model heads may be used to analyze the input image and generate their respective recognition results. Hence, instead of relying on a single model head, the system uses multiple heads to get a more comprehensive understanding of the input image, which can improve the accuracy and robustness of the recognition process. In embodiments, method 200 may further comprise the step: based on a determination that the similarity score does not exceed the predetermined threshold: combining 265 said recognition results, wherein the combined recognition results may be used for controlling an autonomous system. The system may use the selected model heads (trained on respective at least two (e.g. top) navigation scenes) to generate their respective recognition results. The recognition results from the at least two selected model heads. The goal is to create a more accurate and comprehensive recognition outcome by leveraging the strengths of both model heads. Combining the results can be done in various ways, such as averaging the outputs, using a voting mechanism, or applying a fusion technique. Examples of combining the results may include: For an object detection and / or recognition task, a Non-Maximum Suppression (NMS) technique may be employed to merge bounding boxes generated by multiple heads of the machine learning model. Additionally, a Weighted Box Fusion (WBF) technique can be utilized to assign greater weight to model heads with higher similarity scores. In the context of image segmentation, techniques such as pixel-wise majority voting or weighted averaging may be applied to enhance the accuracy of the detected classes. This approach helps improve the robustness and accuracy of the recognition process, especially in cases where the input image does not clearly belong to a known navigation scene. In embodiments, method 200 may further comprise: based on the determination that the similarity score does not exceed the predetermined threshold: recording 270 sensor data and / or environmental condition data of the autonomous navigation; and adding 275 said data to a dataset to be used for retraining the multiple heads. When the similarity score does not exceed the predetermined threshold, indicating that the input image might not clearly match any known navigation scene in the dataset, the method records sensor data and / or environmental condition data. For instance, recording sensor data may involve capturing data from various sensors on the autonomous navigation system, such as cameras, LiDAR, radar, GPS, etc. Recording environmental condition data may include information about the current environment, such as weather conditions, lighting, road conditions, and any other relevant factors. In embodiments, the recorded sensor and / or environmental data may be added to a dataset. This dataset may be used for further training for improving the machine learning model. For instance, retraining the existing heads comprise using the new data to update and improve the existing model heads, making them more robust and accurate. In embodiments, the retraining the multiple heads may include utilizing the output of the current model (i.e. of the output of the at least two machine learning model heads identified in step 255) for preliminary labeling. The model is subsequently fine-tuned and refined through human-assisted labeling efforts to enhance accuracy and reliability. The newly recorded and labeled data is subsequently utilized to train a new iteration of the model employing machine learning techniques, including but not limited to methods such as backpropagation, stochastic gradient descent (SGD), or other optimization algorithms designed to minimize an objective function and refine model parameters. In embodiments, the step 130 of method 100, namely: obtaining, based on the similarity score, a navigation scene, may comprise at least one of the steps of method 200, in particular, at least one of the steps 230 (determining 230 whether the similarity score exceeds a predetermined threshold) and subsequent steps 235-275. Fig. 3 is a diagram representing an embodiment of the detection, recognition and classification system implementing methods 100 and 200, and Fig. 4 is a diagram representing an embodiment of the general structure of the input and output of a transformer model used as the machine learning model in methods 100 and 200. The input image 310, 410 may be divided into n patches 420, also called tokens 420, as seen in Fig. 4. The tokens are then flattened in a sequence and the class token 430, also called CLS token 430, is added to the sequence, as shown in Fig. 4 and as explained in relation with step 115 of method 100 above (refer to: the class token may be denoted as [CLS] token. It may be a learnable embedding introduced at the beginning of the sequence of patch embeddings in a Vision Transformer (ViT). It may have the same dimension as the patch embeddings to ensure compatibility with the transformer model's architecture ...). The machine learning model 440, in this case the (e.g. vision) transformer model 440, is used to generate an embedding 450 for each patch / token, and a projected embedding 460 for the class token 430, as explained in step 120 of method 100 and / or 200 above. This embedding generation is done by the embedding generation module 320. The general scene embedding represented by the CLS token is used by the scene classification module 330 to determine a similarity score with reference class tokens stored in a database as explained in step 125 of method 100 and / or 200. When it is determined that the similarity score exceeds a predetermined threshold, a navigation scene that is associated with the highest similarity score is obtained, and the machine learning model head trained on the obtained navigation scene is determined, and using the selected machine learning model head, recognition results are generated. When it is determined, based on the general scene embedding (i.e. the class token CLS) that the similarity score does not exceed the predetermined threshold, the latent space metric module 340 and the dynamic detection head search module 350 activates steps 250 to 275 of method 100 and / or 200 to generate detections and save them in the detections module 370. In particular, step 270 of method 100 and / or 200 is performed by the data recording module 360, and step 275 is performed by the Put-of-Distribution (OoD) module 380. Fig. 5 is an embodiment of a recognition method 500 that can handle both in-distribution and out-of-distribution in input data of autonomous navigation. The embeddings of the patches or tokens are generated 510 by the machine learning model (e.g. vision transformer). The class token is projected into a latent space to calculate the latent space metric (e.g. the projected latent space, e.g. CLS). A comparison is performed 520 between the projected class token and each of the patch embeddings, if the out-of-distribution score is less than a predetermined threshold (i.e. if the similarity score is bigger than the predetermined threshold - corresponds to the “No” in the flow diagram), the scene class scores are calculated 525 (i.e. the similarity scores between the projected score metric and each of the patch embeddings), and the Top-1 detection head is selected 530 that corresponds to the maximum scene class score (or similarity score). And the Top-1 detection or recognition head is used 535 to generate detections results (also called in this disclosure recognition results). if the out-of-distribution score is bigger than the predetermined threshold (i.e. if the similarity score is less than the predetermined threshold - corresponds to the “Yes” in the flow diagram), the scene class scores are calculated 540 (i.e. the similarity scores between the projected score metric and each of the patch embeddings), and the Top-N detection heads are selected 550 that correspond to the maximum scene class scores (or similarity scores). And the Top-N detection or recognition head are used 555 to generate detections results (also called in this disclosure recognition results). The detections results from each head or the Top-N heads are combined 560. In addition, data recording is triggered 545 to record the navigation scene and store the recording in a dataset to be used to retrain the machine learning model and / or its heads. Accordingly, the invention addresses the limitations of scene classification in autonomous vehicles by introducing a dynamic and specialized approach leveraging the Vision Transformer (ViT) architecture. The key technical features of the present disclosure include: A. Vision Transformer (ViT) Architecture: The Vision Transformer (ViT) architecture is at the core of the invention, providing advanced capabilities for image feature extraction as global embeddings and act as a world model. Unlike traditional convolutional neural networks (CNNs), ViT uses a transformer-based approach, which processes images as sequences of fixed-size patches (tokens), like words in a text. This method allows the model to capture long-range dependencies and details within an image. For each token of an input image, the ViT generates embeddings that encapsulate the visual information contained in that token. Additionally, a general scene token is generated to represent the entire image, providing a holistic understanding of the scene. B. Scene Classification Module: The scene classification module leverages the general scene token to classify the overall context of the image. This classification is crucial for determining which detection / segmentation head should be used. 1. Contextual Understanding: The general scene token captures the global context of the image, allowing the system to understand the broader scene, such as distinguishing between daytime urban driving and nighttime highway driving. This contextual understanding enables the system to select the most appropriate detection / segmentation head for the task. 2. Appropriate Head Selection: Based on the classified scene, the module determines the most suitable detection / segmentation head from a set of specialized heads. This ensures that the system uses the detection head optimized for the current driving conditions, improving accuracy and reliability. C. Dynamic Detection Head Switching: To address the challenge of varying driving conditions, the invention features multiple detection / segmentation heads, each trained on data specific to different scenes. 1. Specialized Detection Heads: Each detection head is specialized and trained on data from specific scenarios, such as daytime urban driving, nighttime highway driving, foggy conditions, or snowy landscapes. This specialization ensures that each head can accurately detect and segment objects in its respective environment. 2. Real-Time Adaptability: The system dynamically switches between these pre-trained heads based on the real-time classification of the scene. For example, when the vehicle enters a tunnel, the system can immediately switch from a daytime driving head to a nighttime head, ensuring continuous high accuracy under varying conditions. D. Latent Space Metric Module: To ensure continuous improvement and adaptability, the invention includes a latent space metric module that assesses the rarity or uniqueness of the current scene. 1. Rarity and Uniqueness Assessment: The latent space metric module analyzes the embedding of the scene token to determine if the current scene is unique or rare compared to the training data. This assessment helps identify scenarios that are underrepresented in the training data. 2. Triggering Data Recording: When a rare or unique scene is detected, the module triggers the recording module to capture the current driving session. This ensures that data from unusual scenarios is captured for future training. E. Automatic Data Recording and Training Set Expansion: The invention includes mechanisms for automatic data recording and training set expansion, which are critical for continuous improvement. 1. Data Capture: When a rare or unique scene is identified, the system records the driving session, capturing all relevant data, including sensor inputs and / or environmental conditions. This data is stored for subsequent analysis and training. 2. Active Training Set Expansion: The recorded data is added to an actively expanding training set, which is used to retrain the detection heads. This process ensures that the system continuously learns from new and challenging scenarios, improving its performance overtime. The invention offers several distinct advantages over prior art solutions: 1. Enhanced Detection Accuracy: By utilizing specialized detection / segmentation heads trained on specific scenarios, the system achieves significantly higher accuracy compared to a single, monolithic model. 2. Dynamic Adaptability: The ability to dynamically switch between different detection heads based on real-time scene classification allows the system to adapt to changing driving conditions seamlessly. This ensures optimal performance across a wide range of environments, such as transitioning from daytime to nighttime or entering a tunnel. 3. Robust Scene Understanding: The use of the Vision Transformer (ViT) architecture provides a detailed and nuanced understanding of visual data, improving the system's ability to accurately detect and segment objects in complex scenes. 4. Continuous Improvement: The latent space metric module identifies rare or unique scenes, enabling the system to capture and incorporate new data into the training set. This active learning approach ensures that the system continuously improves over time, enhancing its performance in critical scenarios. 5. Scalability and Flexibility: The system's architecture allows for easy scalability and integration of new detection heads as new scenarios and challenges are identified. This flexibility makes the system adaptable to future advancements in autonomous driving technology. 6. Handling Unusual or Out-of-Distribution Scenarios: A key advantage of the system is its ability to detect unusual or out-of-distribution scenarios that are not well represented in the training data. The system reacts to these scenarios by selecting the most appropriate detection head and recording the scene for later addition to the training set, ensuring that the system can learn from and improve upon these rare events. Beyond autonomous driving, the invention can be applied to several other fields where object detection and segmentation can be improved using scene-aware classification: Surveillance and Security, Robotics, Aerial and Satellite Imaging. In the present disclosure, any feature or example described in an embodiment, example, and / or method (e.g. method 100, 200, 500), may be combined with any feature or example of another embodiment, example, and / or method, unless otherwise specified. Fig. 6 schematically illustrates a block diagram of an embodiment of an apparatus 600 to execute the methods described herein. The apparatus 600 comprising one or more interfaces 610 for communication and one or more processors or data processing circuits 620 configured to execute any one of the methods described herein. The apparatus further comprises a memory or a storage medium 630. The storage medium 630 (or a data carrier, or a computer-readable data carrier, or a computer-readable medium) may comprise, stored thereon, a computer program or computer-executable instructions for performing one of the methods described herein when it is performed by one or more processors 620. The processors 620 may communicate with the storage medium 630 directly and / or via the one or more interfaces 610. In embodiments, the one or more interfaces 610 may comprise wired and / or wireless interfaces for transmitting and / or receiving communication signals in connection with the execution of the proposed concept. In practice, the interfaces, e.g., comprise pins, wires, antennas, and / or the like. As well, the interfaces may comprise means for (analog and / or digital) signal or data processing in connection with the communication, e.g., filters, samples, analog-to-digital converters, signal acquisition and / or reconstruction means as well as signal amplifiers, compressors and / or any encryption / decryption means. The data processing circuit 620 may correspond to or comprise any type of programable hardware. So, examples of the data processing circuit 620, e.g., comprise a memory, microcontroller, field programmable gate arrays, one or more central and / or graphical processing units. To execute the proposed method, the data processing circuit 620 may be configured to access or retrieve an appropriate computer program for the execution of the proposed method from a memory of the data processing circuit 620 or a separate memory which is communicatively coupled to the data processing circuit 620. Some or all of the method steps described above with regard to Figures 1-3 may be 5 implemented by a computer in that they are executed by (or using) a processor, a microprocessor, an electronic circuit, or the data processing circuit 620. For example, the implementation can be performed using a non-transitory storage medium such as a computer-readable storage medium or data carrier. Such computer-readable media include any media that can be accessed by either a general-purpose or a specialized computer 10 system. Generally, the methods described herein can be implemented as a computer program product with a program code or computer-executable instructions, the program code or computer-executable instructions being operative for performing one of the methods when the computer program products run on a computer. The program code or the 15 computer-executable instructions may, for example, be stored on the computer-readable storage medium 630.
Claims
1. A method for adaptive recognition of navigation scenes in autonomous navigation, the method comprising:obtaining (110), by a machine learning model with multiple heads trained on respective navigation scenes, patch embeddings of an input image;obtaining (115), by the machine learning model, a class token that aggregates information for all the patch embeddings to capture a global context of a navigation scene of the autonomous navigation;obtaining (120), by the machine learning model, a projected class token by projecting the class token into a latent space;obtaining (125), a similarity score, between the projected class token and reference class tokens in a dataset, wherein the reference class tokens are associated with respective navigation scenes;obtaining (130), based on the similarity score, a navigation scene.
2. The method of claim 1, wherein obtaining, based on the similarity score, the navigation scene comprises:obtaining a navigation scene that is associated with a highest similarity score.
3. The method of claim 1 or 2, further comprising:selecting a machine learning model head trained on the obtained navigation scene; andgenerating, using the selected machine learning model head, recognition results, wherein the recognition results are used for controlling an autonomous system.
4. The method of claim 1, wherein obtaining, based on the similarity score, the navigation scene comprises:determining (230) whether the similarity score exceeds a predetermined threshold;based on a determination that the similarity score exceeds the predetermined threshold:obtaining (235) a navigation scene that is associated with a highest similarity score;selecting (240) the machine learning model head trained on the obtained navigation scene.
5. The method of claim 4, further comprising: based on the determination that the similarity score exceeds the predetermined threshold:generating (245), using the selected machine learning model head, recognition results, wherein the recognition results are used for controlling an autonomous system.
6. The method of claim 4 or 5, further comprising: based on a determination that the similarity score does not exceed the predetermined threshold:obtaining (250) at least two navigation scenes that are associated with a highest and subsequent highest similarity scores; andselecting (255) machine learning model heads trained on the obtained at least two navigation scenes.
7. The method of claim 6, further comprising: based on the determination that the similarity score does not exceed the predetermined threshold:generating (260), using the selected machine learning model heads, respective recognition results; andcombining (265) said respective recognition results, wherein the combined recognition results are used for controlling an autonomous system.
8. The method of claim 6 or 7, further comprising: based on the determination that the similarity score does not exceed the predetermined threshold:recording (270) sensor data and / or environmental condition data of the autonomous navigation; andadding (275) said data to a dataset to be used for retraining the multiple heads of the machine learning model.
9. The method of claim 7 or 8, wherein combining (265) said recognition results comprises using at least one of averaging, weighted averaging, voting, majority voting, weighted voting, non-maximum suppression, weighted box fusion, pixelwise majority voting, pixel-wise weighted averaging, and fusion techniques, to generate a combined, more accurate recognition result.
10. The method of any previous claim wherein the machine learning model is a vision transformer.
11. The method of any previous claim, wherein obtaining, by said machine learning model, the patch embeddings of the input image comprises segmenting the input image into non-overlapping patches and passing said patches through a linear layer of the model.
12. The method of any previous claim, wherein projecting the class token into a latent space comprises transforming the class token into the latent space using crossattention mechanisms within the machine learning model.
13. A computer program comprising instructions which, when the computer program is executed by a computer, cause the computer to carry out the method of claims 1 to 12.5 14. A computer-readable data carrier having stored thereon the computer program ofclaim 12.
15. An apparatus (600) comprising:io one or more interfaces for communication (610);a memory (630); anda data processing circuit (620) configured to carry out the method of claims 1 to 15 12.36