---
title: "Augmenting CNNs with attention-based aggregation"
kind: "Kit"
category: "Research"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/3e570458-d278-448a-8a11-21bd4d8cd63b"
updated: "2026-11-13"
---

# Augmenting CNNs with attention-based aggregation

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Shows the attention map behind an image classifier's decision, using a CNN with attention-based aggregation trained on ImageNette, in a Gradio page. For machine learning learners and researchers.

Augmenting CNNs with attention-based aggregation is a kit in the Research category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-13. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by keras-io

## About

### What it is

This Gradio app lets you see why an image classifier chose its label. It returns the model's attention map, a picture of which areas the model leaned on. The model is trained on the ImageNette dataset and comes from the keras-io group.

### Who it suits

It suits machine learning learners and researchers who want to inspect what a vision model attends to, and developers who want a clean example of a model, utilities and examples in one Space. The README also credits three authors.

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Research | Vision researchers | Check which areas drive a classification | Run an example image and view the attention map |
| Education | Machine learning students | Learn what an attention map shows | Compare the map with the original picture |
| Software | Python developers | Read a model, utilities and examples layout | Browse the model and utilities folders |

You can skip it if you need a model for classes outside ImageNette.

### Where to use it

- A web browser, on the Space's page on Hugging Face
- Windows, macOS or Linux with Python, from a downloaded copy

| Use case | Who | What they get back |
| --- | --- | --- |
| Explain a classification | Researchers | An attention map for the image |
| Try the bundled examples | Learners | A quick sense of how the map looks |
| Reuse the layout | Developers | Separate folders for model, utilities and examples |

### How to set it up

- Nothing at all if you use the online Space
- Python on your computer, only if you run a copy
- The packages listed in requirements.txt

1. Open the Space's page in a browser to use it with nothing to install.
2. To run a copy, install the Hugging Face Hub package and download the Space.
3. Move into the new folder, then install Gradio and the listed requirements.
4. Start the app with Python.

```sh
pip install -U huggingface_hub
hf download keras-io/patch-conv-net --repo-type space --local-dir patch-conv-net
cd patch-conv-net
pip install gradio
pip install -r requirements.txt
python app.py
```

### How to use it

Online, open the Space and use the controls on its page. On your own machine, run the main file from the Space folder, then use the page it serves. The example images are the quickest way to try it.

```sh
python app.py
```

### Example

You open the Space and pick an example image. The app returns the model's predicted class together with an attention map over the picture. The record does not describe the display, so check the page.

### For newcomers and experts

An attention map is a heat overlay that shows which parts of a picture mattered most for the answer. Start by opening the Space and running one of the example images.

If you know the field, the model adds an attention-based aggregation step on top of convolutional features, which is what makes the attention map available. It is trained on ImageNette, a small ten class subset of ImageNet. The record gives no accuracy figures.

You pick or upload an image → Convolutional layers extract features → Attention-based aggregation weighs the features → The page shows the class and the attention map

### Good to know

- License: afl-3, as listed on the Space
- Cost to run: none named
- Data it reaches: the images you give it and the model files in the repository
- Not for: images outside the classes the ImageNette dataset covers

## README

````markdown
# Augmenting CNNs with attention-based aggregation

Shows the attention map behind an image classifier's decision, using a CNN with attention-based aggregation trained on ImageNette, in a Gradio page. For machine learning learners and researchers.

Made by keras-io on Hugging Face. These notes are Mindket's, written from its Space page and README; the app's own files and license are on Hugging Face.

## About

What it is: This Gradio app lets you see why an image classifier chose its label. It returns the model's attention map, a picture of which areas the model leaned on. The model is trained on the ImageNette dataset and comes from the keras-io group.

Who it suits: It suits machine learning learners and researchers who want to inspect what a vision model attends to, and developers who want a clean example of a model, utilities and examples in one Space. The README also credits three authors.

```table
Industry | Who uses it | How they use it | Example
Research | Vision researchers | Check which areas drive a classification | Run an example image and view the attention map
Education | Machine learning students | Learn what an attention map shows | Compare the map with the original picture
Software | Python developers | Read a model, utilities and examples layout | Browse the model and utilities folders
```

You can skip it if you need a model for classes outside ImageNette.

Where to use it:

- A web browser, on the Space's page on Hugging Face
- Windows, macOS or Linux with Python, from a downloaded copy

```table
Use case | Who | What they get back
Explain a classification | Researchers | An attention map for the image
Try the bundled examples | Learners | A quick sense of how the map looks
Reuse the layout | Developers | Separate folders for model, utilities and examples
```

How to set it up:

- Nothing at all if you use the online Space
- Python on your computer, only if you run a copy
- The packages listed in requirements.txt

1. Open the Space's page in a browser to use it with nothing to install.
2. To run a copy, install the Hugging Face Hub package and download the Space.
3. Move into the new folder, then install Gradio and the listed requirements.
4. Start the app with Python.

```sh
pip install -U huggingface_hub
hf download keras-io/patch-conv-net --repo-type space --local-dir patch-conv-net
cd patch-conv-net
pip install gradio
pip install -r requirements.txt
python app.py
```

How to use it: Online, open the Space and use the controls on its page. On your own machine, run the main file from the Space folder, then use the page it serves. The example images are the quickest way to try it.

```sh
python app.py
```

Example: You open the Space and pick an example image. The app returns the model's predicted class together with an attention map over the picture. The record does not describe the display, so check the page.

For newcomers and experts: An attention map is a heat overlay that shows which parts of a picture mattered most for the answer. Start by opening the Space and running one of the example images.

If you know the field, the model adds an attention-based aggregation step on top of convolutional features, which is what makes the attention map available. It is trained on ImageNette, a small ten class subset of ImageNet. The record gives no accuracy figures.

```flow
You pick or upload an image
Convolutional layers extract features
Attention-based aggregation weighs the features
The page shows the class and the attention map
```

Good to know:

- License: afl-3, as listed on the Space
- Cost to run: none named
- Data it reaches: the images you give it and the model files in the repository
- Not for: images outside the classes the ImageNette dataset covers

## On Hugging Face, 13 November 2026

- Likes: 6
- Built with: gradio
- License: afl-3.0

## Links

- Space: https://huggingface.co/spaces/keras-io/patch-conv-net
- Files: https://huggingface.co/spaces/keras-io/patch-conv-net/tree/main

## Try it

Open the Space in your browser, or copy it to your own Hugging Face account from its page. Nothing in this kit runs by itself.
````

## What is in it

1 files, 4 KB, downloaded as a zip.

```text
README.md  4 KB
```

## Source

[keras-io/patch-conv-net on Hugging Face](https://huggingface.co/spaces/keras-io/patch-conv-net)

## Compare with similar

Listed Hugging Face Spaces in the same category that share the most tags with this one.

| Product | Likes | Built with | License | Last change |
| --- | --- | --- | --- | --- |
| Augmenting CNNs with attention-based aggregation (this page) | 6 | gradio | afl-3.0 | 2022-01-27 |
| [Open VLM Leaderboard](https://mindket.com/p/9382a913-7563-4967-88b1-0f2458cb00bc) | 1,034 | gradio | apache-2.0 | 2026-03-11 |
| [Face Swap](https://mindket.com/p/92787455-1f9f-466a-b574-da22b25d6e0a) | 808 | gradio | cc-by-nc-sa-4.0 | 2024-05-22 |
| [TTS Spaces Arena](https://mindket.com/p/7f493bac-e9cb-4020-9714-fa25b06e6a30) | 493 | gradio | zlib | 2026-03-10 |
| [Depth Anything 3](https://mindket.com/p/c1e531c5-63e1-4315-a529-7fcae3cb7374) | 490 | gradio | cc-by-nc-4.0 | 2025-11-20 |
| [BLIP](https://mindket.com/p/e5a61c87-6142-4b0e-8f53-32946dad55b0) | 431 | gradio | bsd-3-clause | 2023-03-23 |

Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2022-01-27
- First published: 2022-03-02
- Checked on Hugging Face: 2026-11-13
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open keras-io/patch-conv-net on Hugging Face](https://huggingface.co/spaces/keras-io/patch-conv-net)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/3e570458-d278-448a-8a11-21bd4d8cd63b)
- [Its page on Mindket](https://mindket.com/p/3e570458-d278-448a-8a11-21bd4d8cd63b)
