Mindket

Augmenting CNNs with attention-based aggregation

Newversion 1 · updated

Overview

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 . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • 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
Runs in
  • A web browser, on the Space's page on Hugging Face
  • Windows, macOS or Linux with Python, from a downloaded copy
Start with
pip install -U huggingface_hub
hf download keras-io/patch-conv-net --repo-type space --local-dir patch-conv-net
cd patch-conv-net

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

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.

IndustryWho uses itHow they use itExample
ResearchVision researchersCheck which areas drive a classificationRun an example image and view the attention map
EducationMachine learning studentsLearn what an attention map showsCompare the map with the original picture
SoftwarePython developersRead a model, utilities and examples layoutBrowse 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 caseWhoWhat they get back
Explain a classificationResearchersAn attention map for the image
Try the bundled examplesLearnersA quick sense of how the map looks
Reuse the layoutDevelopersSeparate 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.
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.

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.

  1. You pick or upload an image
  2. Convolutional layers extract features
  3. Attention-based aggregation weighs the features
  4. 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 and files

README

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.

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.
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.

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

On Hugging Face, 13 November 2026

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

Links

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.

Files
README.md  4 KB

1 file, 4 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-13

Compare with similar

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

ProductLikesBuilt withLicenseLast change
Augmenting CNNs with attention-based aggregation This page6gradioafl-3.0
Open VLM LeaderboardShares gradio1,034gradioapache-2.0
Face SwapShares gradio808gradiocc-by-nc-sa-4.0
TTS Spaces ArenaShares gradio493gradiozlib
Depth Anything 3Shares gradio490gradiocc-by-nc-4.0
BLIPShares gradio431gradiobsd-3-clause
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Research

See all in Research

EarthJev

dBenf · Kit

Answers typed questions about satellite image patches from all 12 Sentinel-2 bands, returning a probability for each option without writing text. A Qwen3.5-0.8…

New

getting-over-it-rl-jax

zimmerk4 · Kit

Plays the full game Getting Over It from the bottom to the end with a small trained policy network that learned inside a JAX physics simulator. For reinforceme…

New

ReFoCo

yuji-nozawa · Kit

Pretrained vision transformer checkpoints in three sizes from a research paper on training attention heads to focus on image regions. For researchers who extra…

New