Perception - Semantic Segmentation
This project uses UNet for Semantic Segmentation in autonomous-driving scenes. The input is an RGB image from a forward-facing vehicle camera, and the output is a class label for every pixel.
The download link for the complete project is:https://github.com/TOPSlearningcenter/UNet
Model Overview
1. Model overview:
UNetIt is a classic semantic segmentation model, which mainly consists of two parts: an encoder and a decoder. Skip connections are used between the encoder and the decoder to retain features. This design enables UNet to efficiently extract and restore features when processing images with complex structures and details, thereby achieving accurate segmentation results.
2. Model Architecture:
- Encoder:UNet's encoder consists of multiple convolutional layers and max-pooling downsampling layers, the number and size of both of which can be adjusted according to the size and depth of the input image.
- Decoder:UNet's decoder consists of multiple deconvolutional upsampling layers and convolutional layers, the number and size of which can be adjusted according to the size and depth of the feature map output by the encoder.
- Jump connection:UNet uses skip connections between the encoder and decoder to preserve the detailed features of high-resolution images.
3. Implementation:
- Data loading:Load RGB images and corresponding labels, and preprocess the images, including normalization, scaling, etc.
- train:The UNet model is trained using the Adam optimizer, supervised by the cross-entropy loss function.
- Testing/Visualization:The model infers and visualizes images based on predicted class labels.