This project is developed as part of my Bachelor's degree at Technical University in Kosice, under the guidance of M.Eng. Dominik Vranay, PhD. and my supervisor prof. Ing. Peter Sinčák, CSc.
This repository contains a Python implementation of a Capsule Neural Network (CapsNet) that is trained and evaluated on the MNIST dataset. The project focuses on visualizing the coupling coefficients of the network, leveraging a GraphVisualizer class that represents the connections between capsules.
- Training and evaluation of a Capsule Neural Network using PyTorch.
- Custom class MySampler for balancing classes in each batch during training.
- Visualization of coupling coefficients with an interactive graph.
- A web application built with Dash for an interactive user experience.
- Python
- PyTorch
- NetworkX
- Dash
- Plotly
- Matplotlib
Clone the repository and install the required packages:
git clone https://github.com/LordWhiskas/Visualization-Capsule-Neural-Networks.git
cd Visualization-Capsule-Neural-Networks
pip install -r requirements.txt
Run the file
modelLoad.pyGo to the url that you will see in console
Click button
update graphYou can change image using
rightorleftbuttonsAfter changing image click on
update graphto see new graph
❗Use custom sampler MySampler for balancing classes in your dataset. It will improve your model's accuracy.
I would like to express my deepest appreciation to Dominic Vranay, who is providing expert guidance and support throughout the development of this project.
