Spatial Explanations with Occlusions: In computer vision, businesses must grasp the workings of image models to fully leverage visual data. Our simple method called spatial explanations with occlusions, helps achieve a deeper understanding. By employing spatial occlusions across images, this technique unveils critical areas that significantly influence the model’s predictions.”
What to do with these insights, you may ask. Having a deeper understanding of your system is the first step to optimizing your business. You can use these insights for 2 purposes:
Ensure AI Validation: During your initial experiences, you may encounter low-quality data, such as small datasets, biased information, or a lack of representativeness. As a result, your model might focus on areas that you know are irrelevant to your system. This can happen no matter how great the metrics on the test set are. Using visual explanations, you can quickly assess how trustworthy your AI is.
Learn with the AI: Learn from your model which factors are most relevant for decision-making. In this way, you will have more control over your system, quickly reaching business optimization.
How to get clarity from Occlusions?
Spatial explanations rely on the concept of occlusion, where specific areas of an image are masked or occluded to observe their impact on the model’s predictions. To do so, a patch of the original image is replaced with the average values from the dataset in the corresponding location. The original image and the image with the occlusion are analyzed by the predictive model and the difference between those predictions is used as a proxy of the region’s importance. The higher the difference, the greater the impact of the region. By repeating this process with patches from different locations and of different sizes, it is possible to build a heatmap, where the temperature represents the impact on the predictions.
Replacing the occlusion with average values from the dataset is particularly effective in industrial settings, where cameras and most objects remain fixed. In scenarios where the average patch occlusion is not suitable, you can employ alternative methods. Here are some other options:
Occluding with a black patch – We don’t recommend this one since too many zeros on the input might deactivate chains of neural activations, returning odd predictions.
Employing advanced inpainting techniques – Returns more reliable results but creates the need of relying on a third-party tool
Decreasing the resolution – Instead of replacing the patch with different information, add some blur or pixelate that patch, decreasing the volume of information without creating odd edges and textures in the image.
This adaptability allows the spatial occlusions explanation method to be tailored to the specific needs of your business.
Some tricks up your sleeve
Well done! Now you know the rationale behind our method! What about a few more tips to get the best from your explainable heat maps?
Mitigating Grid Patterns: Using larger strides can lead to grid patterns, reducing their interpretability. To overcome this challenge, you have two options. Firstly, you can reduce the stride, which provides clearer explanations but increases computational time. Alternatively, applying a Gaussian Blur to the occluded regions helps to smooth out the patterns, resulting in smoother color transitions.
Weighted Averaging: We also enhanced our spatial explanations by incorporating an inversely proportional weight based on the patch size. This technique ensures that the importance of each patch is appropriately considered, leading to more accurate and reliable explanations.
Addressing Repetitive Explanations: In industrial contexts, explanations can sometimes become repetitive, consistently highlighting the same locations. We recommend comparing the image-based explanation values to the dataset’s average explanation using either the absolute difference. This provides valuable insights into regions that deviate from the norm, enabling a deeper understanding of their distinctiveness.
Spatial explanations offer a powerful approach to interpreting image models and extracting valuable insights from visual data. By employing spatial occlusions, businesses can unravel the inner workings of their models, enabling informed decision-making and enhanced trust. Embrace the power of spatial explanations to unlock the full potential of your image models. Contact us if you’re ready to embark on a journey of comprehensive understanding and actionable insights.
Like this story?
Subscribe to Our Newsletter
Special offers, latest news and quality content in your inbox once per month.
Signup single post
Recommended Articles
Article
AI City Intelligence
Oct 31, 2024 in
Use Case
Imagine being able to make better decisions about where to live, where to establish a new business, or how to understand the changing dynamics of urban neighborhoods. Access to detailed, up-to-date information about city environments allows us to answer these questions with greater confidence, but the challenge lies in accessing and analyzing the right data. […]
EcoRouteAI: Otimização de Ecopontos com Inteligência Artificial
Sep 30, 2024 in
News
O Plano Estratégico para os Resíduos Urbanos (PERSU) 2030 definiu metas ambiciosas para a gestão de resíduos em Portugal, com o objetivo de aumentar a reciclagem e melhorar a sustentabilidade ambiental. No entanto, os atuais índices de reciclagem e separação de resíduos ainda estão aquém do necessário, tanto a nível nacional quanto europeu, criando desafios […]
NILG.AI named Most-Reviewed AI Companies in Portugal by The Manifest
Aug 28, 2024 in
News
The artificial intelligence space has been showcasing many amazing technologies and solutions. AI is at its peak, and many businesses are using it to help propel their products and services to the top! You can do it, too, with the help of one of the best AI Companies in Portugal: NILG.AI. We focus on your […]
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.