This project is about to get segmentation mask of one particular class - Road in this case. And transform frontal view of this object taken from the camera into top down (bird's eye) view.
Input: Original image taken from the camera (3 channels image). Camera's parameters(intrinsics, distortion coefficients).
Output: Segmentation mask (1 channel image) perspective transformed to top down view.
- Segmentation algorithm was taken from https://github.com/open-mmlab/mmsegmentation
- There are 3 different perspective transformation algorithms in the project:
projector_initial.py
contains a mix of opencv functions and manual operations with numpy arrays.projector_opencv.py
contains transformation method based purely on opencv functions.projector_alternative.py
contains a manual perspective transformation method.
- Interfaces of all methods are the same, so any of them can be used interchangeably. One just need to change import module in line 4 of
main.py
file.
- It's recommended to build a container based on the Dockerfile from the project
git clone https://github.com/freetown113/birds_eye_view.git
cd birds_eye_view
bash setup.sh
bash launch.sh
- After the completion of the program execution process the
output.jpg
image will be saved to theresult
directory.