Neural Network
A mathematical model inspired by biological neural circuits, composed of input, hidden, and output layers, serving as the foundation for advanced image processing tasks.
A neural network is a computational model inspired by biological neurons. Each artificial neuron computes a weighted sum of inputs, applies an activation function, and passes the result forward. Stacking these units into multiple layers enables learning complex tasks such as image classification, object detection, and image generation.
Core components:
- Input layer: Receives raw data. For RGB images, the input is a width × height × 3 tensor
- Hidden layers: Apply nonlinear transformations. Deeper networks represent more complex patterns (deep learning)
- Output layer: Produces task-specific results - class probabilities for classification, continuous values for regression
- Activation functions: ReLU, Sigmoid, Tanh introduce nonlinearity for complex decision boundaries
Training uses backpropagation, propagating loss gradients from output to input to update weights. Common optimizers include SGD, Adam, and AdaGrad.
model = Sequential([Dense(128, activation='relu'), Dense(10, activation='softmax')])- Keras exampleloss = nn.CrossEntropyLoss()- PyTorch classification loss
In image processing, fully-connected networks cannot exploit spatial structure, leading to CNNs. Beyond CNNs, GANs, Vision Transformers, and diffusion models have dramatically expanded computer vision capabilities.