Skip to content

Commit f64d6c7

Browse files
committed
init: initial commit
1 parent a5d4026 commit f64d6c7

File tree

446 files changed

+2092628
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

446 files changed

+2092628
-0
lines changed

LICENSE

Whitespace-only changes.

README.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Guide to Semantic Segmentation & Localization
2+
3+
**AutoSeg-Localization** is a modular and extensible repository designed to guide researchers and practitioners through the **semantic segmentation** and **vehicle localization** workflow for autonomous driving applications.
4+
It builds on hands-on assignments from the **[Automated and Connected Driving Challenges (ACDC)](https://www.edx.org/course/automated-and-connected-driving-challenges)** MOOC by [RWTH Aachen University](https://rwth-aachen.de) and extends them into a **reproducible research framework**.
5+
6+
The repository provides:
7+
8+
* **Dockerized environment** for reproducibility and portability.
9+
* **Jupyter notebooks** covering preprocessing, model training, and evaluation.
10+
* **Structured folders** for datasets, experiments, and literature.
11+
* **Roadmap** to advance from simple baselines to full-fledged semantic segmentation pipelines.
12+
13+
---
14+
15+
## Repository Structure
16+
17+
```
18+
AutoSeg-Localization/
19+
20+
├── docker/
21+
│ ├── Dockerfile
22+
│ ├── requirements.txt
23+
│ └── run.sh
24+
25+
├── notebooks/
26+
│ ├── Localization.ipynb
27+
│ ├── assets/
28+
│ ├── datasets/
29+
│ ├── grid_mapping/
30+
│ ├── ipm_assets/
31+
│ └── localization/
32+
│ ├── object_detection/
33+
│ ├── segmentation_utils/
34+
│ ├── tensorflow_datasets/
35+
├── experiments/
36+
│ ├── runs/
37+
│ └── configs/
38+
├── literature/
39+
│ ├── papers/
40+
│ └── summaries.md
41+
├── .gitignore
42+
├── LICENSE
43+
└── README.md
44+
```
45+
46+
---
47+
48+
## 🗺 Roadmap for Semantic Segmentation & Localization
49+
50+
This repository is structured as a **step-by-step learning and experimentation path**:
51+
52+
1. **Data Preparation**
53+
54+
* Preprocessing raw datasets (cropping, resizing, augmentations).
55+
* Managing datasets for reproducibility.
56+
57+
2. **Model Development**
58+
59+
* Implementing baseline models (e.g., U-Net, FCN).
60+
* Exploring advanced architectures (DeepLab, SegNet, Transformer-based).
61+
62+
3. **Training & Experimentation**
63+
64+
* Defining configs (`experiments/configs/`).
65+
* Tracking runs and metrics (`experiments/runs/`).
66+
* Hyperparameter tuning.
67+
68+
4. **Evaluation & Metrics**
69+
70+
* Standard metrics: IoU, pixel accuracy, confusion matrices.
71+
* Visualization of segmentation maps and error distributions.
72+
73+
5. **Localization & Sensor Fusion**
74+
75+
* Evaluating vehicle trajectory estimation.
76+
* Comparing ground truth vs. estimated poses.
77+
* Analyzing errors in position, yaw, and vehicle frame deviations.
78+
79+
6. **Scaling Up** *(future extensions)*
80+
81+
* Incorporating large-scale datasets (Cityscapes, KITTI, nuScenes).
82+
* Adding experiment management tools (MLflow, Weights & Biases).
83+
* Extending to 3D segmentation & multi-modal fusion (LiDAR + camera).
84+
85+
---
86+
87+
## 🐳 Getting Started with Docker
88+
89+
Ensure you have **Docker** installed.
90+
91+
### 1. Clone the Repository
92+
93+
```bash
94+
git clone https://github.com/your-username/Segmentation-Lab.git
95+
cd Segmentation-Lab
96+
```
97+
98+
### 2. Build the Docker Image
99+
100+
```bash
101+
docker build -t segmentation-lab -f docker/Dockerfile .
102+
```
103+
104+
### 3. Run the Container
105+
106+
```bash
107+
bash docker/run.sh
108+
```
109+
110+
This mounts your repo into the container and starts Jupyter Lab.
111+
112+
### 4. Open Jupyter
113+
114+
run jupyter lab
115+
---
116+
117+
## Notebooks Overview
118+
119+
* **localization/Localization Evaluation Notebook**
120+
121+
* Evaluates vehicle localization accuracy.
122+
* Compares estimated vs. ground-truth trajectories.
123+
* Analyzes yaw, longitudinal/lateral deviations, and error distributions.
124+
* Visualizes trajectory alignment and error heatmaps.
125+
* Outcome: identifies systematic localization errors and potential improvements.
126+
127+
---
128+
129+
## Literature & References
130+
131+
This work is inspired by and extends assignments from:
132+
133+
> **Automated and Connected Driving Challenges (ACDC)**, a Massive Open Online Course (MOOC) on [edX.org](https://www.edx.org/course/automated-and-connected-driving-challenges).
134+
> Taught by the [Institute for Automotive Engineering (ika)](https://www.ika.rwth-aachen.de/) of [RWTH Aachen University](https://rwth-aachen.de).
135+
> **Enroll for free** and learn how to shape future automated and connected mobility!
136+
137+
Additional references and papers are stored in the [`literature/`](literature/) folder.
138+
139+
---
140+
141+
## Example Visuals
142+
143+
Trajectory comparison (ground-truth vs. estimated):
144+
145+
![Trajectory Comparison](notebooks/localization/trajectory_plot_example.png)
146+
147+
Segmentation map sample:
148+
149+
![Segmentation Example](notebooks/assets/segmentation_example.png)
150+
151+
---
152+
153+
## License
154+
155+
This project is licensed under the [MIT License](LICENSE).

docker/Dockerfile

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
FROM jupyter/minimal-notebook:lab-3.1.18
2+
3+
USER root
4+
5+
# Install all OS dependencies for fully functional notebook server
6+
RUN apt-get update --yes && \
7+
apt-get install --yes --no-install-recommends \
8+
vim-tiny \
9+
git \
10+
inkscape \
11+
libsm6 \
12+
libxext-dev \
13+
libxrender1 \
14+
lmodern \
15+
netcat \
16+
openssh-client \
17+
# ---- nbconvert dependencies ----
18+
texlive-xetex \
19+
texlive-fonts-recommended \
20+
texlive-plain-generic \
21+
# ----
22+
tzdata \
23+
unzip \
24+
nano-tiny && \
25+
apt-get clean && rm -rf /var/lib/apt/lists/*
26+
27+
# Create alternative for nano -> nano-tiny
28+
RUN update-alternatives --install /usr/bin/nano nano /bin/nano-tiny 10
29+
30+
RUN apt-get update && \
31+
apt install -y git
32+
33+
USER ${NB_USER}
34+
35+
RUN pip install \
36+
'jupyterlab_iframe==0.4.0' \
37+
'git+https://github.com/stv0g/nbgitpuller@f735265f7b2a429a17a8fab70cfd3557f060640d' \
38+
'rwth-nb==0.1.8' \
39+
'tqdm'
40+
41+
RUN conda install --name base --no-update-deps \
42+
'conda==4.10.3' && \
43+
conda install --name base --quiet --yes --no-update-deps \
44+
'jupyterlab-git==0.32.1' \
45+
'ujson==4.0.2' \
46+
'ipympl==0.9.3' \
47+
'matplotlib-base==3.4.3' && \
48+
conda clean --all
49+
50+
51+
RUN conda install --name base --quiet --yes --no-update-deps \
52+
'jupyterlab-drawio==0.9.0' \
53+
'jupyterlab_iframe==0.4.0' \
54+
'jupyterlab_latex=3.0.0' \
55+
'jupyter_core==4.11.2' && \
56+
conda clean --all
57+
58+
RUN conda install --name base --quiet --yes --no-update-deps --channel conda-forge \
59+
'jupyterlab_widgets' \
60+
'jupyterhub=1.1.0' \
61+
'ipywidgets' && \
62+
conda clean --all
63+
64+
# Fix traitlets pip package
65+
RUN pip uninstall -y traitlets
66+
RUN pip install traitlets==5.9.0
67+
68+
# Workaround LaTex
69+
RUN git clone https://github.com/joequant/jupyterlab-latex /tmp/jupyterlab-latex && cd /tmp/jupyterlab-latex && git checkout cbb66825786ecf11a35fd92df797f8ccee719ad4 && pip install -ve .
70+
RUN jupyter lab build
71+
72+
73+
USER root
74+
75+
# Use RWTH Mirror
76+
#RUN sed -i 's|http://archive.ubuntu.com|http://ftp.halifax.rwth-aachen.de|g' /etc/apt/sources.list
77+
78+
RUN apt-get update && \
79+
apt-get -y install \
80+
language-pack-de \
81+
texlive-latex-recommended \
82+
openssh-client && \
83+
rm -rf /var/lib/apt/lists/*
84+
85+
# Add more locales
86+
RUN locale-gen de_DE && \
87+
locale-gen de_DE.UTF-8 && \
88+
update-locale
89+
90+
USER ${NB_USER}
91+
92+
ENV JUPYTER_ENABLE_LAB=yes
93+
94+
# Until HERE RWTH BASE IMAGE
95+
96+
# Install cv2
97+
USER root
98+
99+
# Install Essentials + cv2
100+
RUN apt-get update && \
101+
apt-get install -y --no-install-recommends \
102+
git \
103+
cmake \
104+
build-essential \
105+
curl \
106+
wget \
107+
gnupg2 \
108+
lsb-release \
109+
ca-certificates \
110+
python3-opencv \
111+
&& rm -rf /var/lib/apt/lists/*
112+
113+
114+
# Install ROS
115+
RUN echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list
116+
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
117+
118+
RUN apt-get update && \
119+
apt-get install -y --no-install-recommends \
120+
ros-noetic-ros-base \
121+
ros-noetic-rospack \
122+
ros-noetic-ros-core \
123+
ros-noetic-rospy \
124+
ros-noetic-rosbag \
125+
ros-noetic-rosauth \
126+
ros-noetic-catkin \
127+
ros-noetic-rosconsole \
128+
ros-noetic-franka-ros \
129+
ros-noetic-interactive-marker-tutorials \
130+
ros-noetic-teb-local-planner \
131+
ros-noetic-turtlebot3 \
132+
ros-noetic-turtlebot3-fake \
133+
ros-noetic-mrt-cmake-modules \
134+
ros-noetic-lanelet2 \
135+
ros-noetic-rosbridge-server \
136+
ros-noetic-rosbridge-suite \
137+
ros-noetic-tf2-web-republisher \
138+
ros-noetic-actionlib \
139+
libboost-dev \
140+
libeigen3-dev \
141+
libgeographic-dev \
142+
libpugixml-dev \
143+
libboost-python-dev \
144+
libpython3-dev \
145+
python3-catkin-tools \
146+
python3-catkin-pkg \
147+
python3-rospkg \
148+
python3-empy \
149+
python3-osrf-pycommon \
150+
python3-wstool \
151+
&& rm -rf /var/lib/apt/lists/*
152+
153+
154+
# Install Lanelet2 and build ROS workspace
155+
RUN git clone https://github.com/fzi-forschungszentrum-informatik/Lanelet2 /lanelet2 && \
156+
cd /lanelet2 && \
157+
source /opt/ros/noetic/setup.sh && \
158+
catkin config --source-space /lanelet2 -DPYTHON_EXECUTABLE=/usr/bin/python3 --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_VERSION=3.8 && \
159+
catkin build
160+
161+
USER jovyan
162+
163+
ARG TARGETPLATFORM
164+
165+
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
166+
pip install tensorflow==2.10.0 ; \
167+
elif [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
168+
pip install tensorflow==2.10.0 ; \
169+
fi
170+
171+
# Install packages via requirements.txt
172+
ADD requirements.txt .
173+
RUN pip install -r requirements.txt
174+
175+
# Install Plotly Widget for PCL visualization
176+
RUN pip install plotly
177+
178+
# Install PointPillars Package
179+
RUN pip install git+https://github.com/ika-rwth-aachen/PointPillars.git
180+
181+
# Install Jupyros
182+
RUN conda install jupyter bqplot pyyaml ipywidgets ipycanvas
183+
RUN pip install jupyros==0.7.0a0
184+
RUN pip install roslibpy
185+
RUN pip install pyrosbag
186+
187+
# install the zethus and urdf libraries
188+
RUN pip install pyOpenSSL --upgrade
189+
RUN pip install pymongo
190+
191+
RUN pip install jupyterlab-urdf==0.2.1
192+
RUN pip install jupyterlab-zethus
193+
RUN pip install numpy==1.25.2
194+
195+
ENV ROS_HOSTNAME=localhost
196+
ENV ROS_MASTER_URI=http://localhost:11311

docker/docker_build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
#docker buildx create --use
3+
4+
docker buildx build \
5+
--platform linux/amd64,linux/arm64 \
6+
--cache-from type=registry,ref=rwthika/acdc-notebooks:latest \
7+
--tag rwthika/acdc-notebooks:latest \
8+
--push \
9+
.

0 commit comments

Comments
 (0)