This project is a 3D visualization tool for deep learning network architectures using OpenGL and WinAPI. The application renders predefined architectures (such as AlexNet, VGG16, and ResNet18) or allows users to define their own custom neural networks.
- Render convolutional layers as 3D boxes.
- Render fully connected layers as spheres with interconnections.
- Interactive camera controls with mouse rotation.
- Predefined networks: AlexNet, VGG16, ResNet18.
- Custom network setup via console input.
- GCC (MinGW recommended for Windows)
- OpenGL (
-lopengl32) - GLU (
-lglu32) - Math library (
-lm) - Windows API (
-mwindows)
Ensure that gcc is available in your system's PATH. You can install MinGW from:
Run the following command in the terminal:
gcc main.c -o deep3d -mwindows -lopengl32 -lglu32 -lmThis will produce an executable named deep3d.exe.
Execute the generated binary:
./deep3d.exe- Mouse Drag: Rotate the view.
- Left Click: Hold to enable rotation.
SetupConsole(): Initializes the console for debugging.SetupNetwork(): Loads predefined or custom network architecture.InitOpenGL(): Configures OpenGL for rendering.RenderScene(): Draws the neural network.
- Boxes represent convolutional layers.
- Spheres represent fully connected neurons.
- Arrows indicate layer connections.
SetupAlexNet()SetupVGG16()SetupResNet18()
- Select Custom Network in the menu.
- Enter the number of layers.
- Define layer type (
Boxfor Conv layers,FCfor fully connected layers). - Specify layer dimensions and color.
A rendered AlexNet architecture would look like:
[Input] → [Conv1] → [Conv2] → [Conv3] → [Conv4] → [Conv5] → [FC6] → [FC7] → [FC8]
- If the window does not appear, ensure OpenGL drivers are installed.
- If compilation fails, check that MinGW is correctly installed and in the system PATH.
This project is open-source and available for modification and distribution.
Developed for 3D visualization of neural networks using OpenGL and WinAPI.