Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
benemer committed Sep 20, 2024
1 parent 9fd8b19 commit 1d2e22d
Show file tree
Hide file tree
Showing 28 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ pip_package:
stage: build
script:
- VERBOSE=1 pip install --verbose .
- mapmos_pipeline --help
- mapmos_pipeline --help
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<details>
<summary><b>Click here for qualitative results!</b></summary>

[![MapMOS](https://github.com/PRBonn/MapMOS/assets/38326482/a4238431-bd2d-4b2c-991b-7ff5e9378a8e)](https://github.com/PRBonn/MapMOS/assets/38326482/04c7e5a2-dd44-431a-95b0-c42d5605078a)

<i>Our predictions for the KITTI Tracking sequence 19 with true positives (green), false positives (red), and false negatives (blue).</i>
Expand Down Expand Up @@ -54,15 +54,15 @@ Just type
```bash
mapmos_pipeline --help
```
to see how to run MapMOS.
to see how to run MapMOS.
<details>
<summary>This is what you should see</summary>

![Screenshot from 2023-08-03 13-07-14](https://github.com/PRBonn/MapMOS/assets/38326482/c769afa6-709d-4648-b42d-11092d5b92ac)

</details>

Check the [Download](#downloads) section for a pre-trained model. Like [KISS-ICP](https://github.com/PRBonn/kiss-icp), our pipeline runs on a variety of point cloud data formats like `bin`, `pcd`, `ply`, `xyz`, `rosbags`, and more. To visualize these, just type
Check the [Download](#downloads) section for a pre-trained model. Like [KISS-ICP](https://github.com/PRBonn/kiss-icp), our pipeline runs on a variety of point cloud data formats like `bin`, `pcd`, `ply`, `xyz`, `rosbags`, and more. To visualize these, just type

```bash
mapmos_pipeline --visualize /path/to/weights.ckpt /path/to/data
Expand Down Expand Up @@ -122,7 +122,7 @@ by replacing the paths and the config file names. To evaluate for example on the
mapmos_pipeline /path/to/weights.ckpt /path/to/HeLiMOS --dataloader helimos -s Velodyne/test.txt
```

Note that our sequence `-s` encodes both the sensor type `Velodyne` and split `test.txt`, just replace these with `Ouster`, `Aeva`, or `Avia` and/or `train.txt` or `val.txt` to run MapMOS on different sensors and/or splits.
Note that our sequence `-s` encodes both the sensor type `Velodyne` and split `test.txt`, just replace these with `Ouster`, `Aeva`, or `Avia` and/or `train.txt` or `val.txt` to run MapMOS on different sensors and/or splits.

## Downloads
You can download the post-processed and labeled [Apollo dataset](https://www.ipb.uni-bonn.de/html/projects/apollo_dataset/LiDAR-MOS.zip) and [KITTI Tracking sequence 19](https://www.ipb.uni-bonn.de/html/projects/kitti-tracking/post-processed/kitti-tracking.zip) from our website.
Expand Down
2 changes: 1 addition & 1 deletion config/apollo.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data:
deskew: False
deskew: False

mos:
max_range_mos: -1.0 # No limit
2 changes: 1 addition & 1 deletion config/kitti-tracking.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data:
deskew: True
deskew: True

mos:
max_range_mos: -1.0 # No limit
2 changes: 1 addition & 1 deletion config/kitti.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data:
deskew: False
deskew: False

mos:
max_range_mos: -1.0 # No limit
10 changes: 5 additions & 5 deletions scripts/cache_to_ply.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import os
import typer
import importlib
import os
from pathlib import Path
from typing import List, Optional

import numpy as np
import torch
from typing import List, Optional
import typer
from torch.utils.data import DataLoader
from tqdm import tqdm
from pathlib import Path

from mapmos.datasets.mapmos_dataset import MapMOSDataset, collate_fn
from mapmos.config import load_config
from mapmos.datasets.mapmos_dataset import MapMOSDataset, collate_fn


def cache_to_ply(
Expand Down
4 changes: 3 additions & 1 deletion scripts/precache.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from tqdm import tqdm
from pathlib import Path
from typing import List, Optional

import typer
from tqdm import tqdm

from mapmos.config import load_config

Expand Down Expand Up @@ -62,6 +63,7 @@ def precache(
),
):
from torch.utils.data import DataLoader

from mapmos.datasets.mapmos_dataset import MapMOSDataset, collate_fn

cfg = load_config(config)
Expand Down
7 changes: 4 additions & 3 deletions scripts/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@
# SOFTWARE.

import os
from pathlib import Path
from typing import Optional

import torch
import typer
from typing import Optional
from pathlib import Path
from pytorch_lightning import Trainer
from pytorch_lightning import loggers as pl_loggers
from pytorch_lightning.callbacks import LearningRateMonitor, ModelCheckpoint

from mapmos.config import load_config
from mapmos.datasets.mapmos_dataset import MapMOSDataModule
from mapmos.training_module import TrainingModule
from mapmos.utils.seed import set_seed
from mapmos.config import load_config


def train(
Expand Down
1 change: 1 addition & 0 deletions src/mapmos/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

import typer
from kiss_icp.tools.cmd import guess_dataloader

from mapmos.datasets import (
available_dataloaders,
jumpable_dataloaders,
Expand Down
1 change: 1 addition & 0 deletions src/mapmos/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from typing import List

from pydantic import BaseModel, Field


Expand Down
8 changes: 1 addition & 7 deletions src/mapmos/config/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,12 @@

import importlib
import sys

from pathlib import Path
from typing import Any, Dict, Optional

from pydantic_settings import BaseSettings, SettingsConfigDict

from mapmos.config.config import (
DataConfig,
OdometryConfig,
MOSConfig,
TrainingConfig,
)
from mapmos.config.config import DataConfig, MOSConfig, OdometryConfig, TrainingConfig


class MapMOSConfig(BaseSettings):
Expand Down
1 change: 1 addition & 0 deletions src/mapmos/datasets/apollo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# SOFTWARE.

import numpy as np

from mapmos.datasets.kitti import SemanticKITTIDataset


Expand Down
1 change: 1 addition & 0 deletions src/mapmos/datasets/helimos.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import glob
import os

import numpy as np


Expand Down
1 change: 1 addition & 0 deletions src/mapmos/datasets/kitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import glob
import os

import numpy as np
from kiss_icp.datasets.kitti import KITTIOdometryDataset

Expand Down
1 change: 1 addition & 0 deletions src/mapmos/datasets/kitti_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# SOFTWARE.

import numpy as np

from mapmos.datasets.kitti import SemanticKITTIDataset


Expand Down
17 changes: 9 additions & 8 deletions src/mapmos/datasets/mapmos_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@
# SOFTWARE.

import os
import torch
import numpy as np
from typing import Dict
from pathlib import Path
from torch.utils.data import Dataset, DataLoader
from typing import Dict

import numpy as np
import torch
from pytorch_lightning import LightningDataModule
from torch.utils.data import DataLoader, Dataset

from mapmos.utils.cache import get_cache, memoize
from mapmos.config import MapMOSConfig, DataConfig, OdometryConfig
from mapmos.odometry import Odometry
from mapmos.mapping import VoxelHashMap
from mapmos.config import DataConfig, MapMOSConfig, OdometryConfig
from mapmos.datasets import dataset_factory, sequence_dataloaders
from mapmos.mapping import VoxelHashMap
from mapmos.odometry import Odometry
from mapmos.utils.cache import get_cache, memoize


def collate_fn(batch):
Expand Down
3 changes: 2 additions & 1 deletion src/mapmos/datasets/nuscenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
import sys
from pathlib import Path
from typing import List

import numpy as np
from nuscenes.utils.geometry_utils import transform_matrix
from pyquaternion import Quaternion
import numpy as np


class NuScenesDataset:
Expand Down
3 changes: 2 additions & 1 deletion src/mapmos/mapmos_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import torch
import copy

import MinkowskiEngine as ME
import torch
from pytorch_lightning import LightningModule

from mapmos.minkunet import CustomMinkUNet14
Expand Down
1 change: 1 addition & 0 deletions src/mapmos/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# SOFTWARE.

import numpy as np

from mapmos.pybind import mapmos_pybind


Expand Down
2 changes: 1 addition & 1 deletion src/mapmos/minkunet.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
# Please cite "4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural
# Networks", CVPR'19 (https://arxiv.org/abs/1904.08755) if you use any part
# of the code.
import torch.nn as nn
import MinkowskiEngine as ME
import torch.nn as nn


class BasicBlock(nn.Module):
Expand Down
7 changes: 4 additions & 3 deletions src/mapmos/odometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import numpy as np
from mapmos.config import DataConfig, OdometryConfig
from typing import Type

import numpy as np
from kiss_icp.config import KISSConfig
from kiss_icp.kiss_icp import KissICP, get_registration
from mapmos.registration import get_registration

from mapmos.config import DataConfig, OdometryConfig
from mapmos.mapping import VoxelHashMap
from mapmos.registration import get_registration


def parse_config(config_data: DataConfig, config_odometry: OdometryConfig):
Expand Down
3 changes: 2 additions & 1 deletion src/mapmos/paper_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
import time
from pathlib import Path
from typing import Optional
import torch

import numpy as np
import torch
from tqdm.auto import trange

from mapmos.mapping import VoxelHashMap
Expand Down
16 changes: 8 additions & 8 deletions src/mapmos/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@

import os
import time
from collections import deque
from pathlib import Path
from typing import Optional
from collections import deque
import torch
import numpy as np
from tqdm.auto import trange

import numpy as np
import torch
from kiss_icp.pipeline import OdometryPipeline
from tqdm.auto import trange

from mapmos.config import load_config
from mapmos.mapmos_net import MapMOSNet
from mapmos.odometry import Odometry
from mapmos.mapping import VoxelHashMap
from mapmos.metrics import get_confusion_matrix
from mapmos.utils.visualizer import MapMOSVisualizer, StubVisualizer
from mapmos.odometry import Odometry
from mapmos.utils.pipeline_results import MOSPipelineResults
from mapmos.utils.save import PlyWriter, KITTIWriter, StubWriter
from mapmos.config import load_config
from mapmos.utils.save import KITTIWriter, PlyWriter, StubWriter
from mapmos.utils.visualizer import MapMOSVisualizer, StubVisualizer


class MapMOSPipeline(OdometryPipeline):
Expand Down
2 changes: 1 addition & 1 deletion src/mapmos/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import numpy as np

from kiss_icp.config.parser import KISSConfig

from mapmos.mapping import VoxelHashMap
from mapmos.pybind import mapmos_pybind

Expand Down
16 changes: 5 additions & 11 deletions src/mapmos/training_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,18 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import torch
import numpy as np

import torch
from pytorch_lightning import LightningModule
from mapmos.mapmos_net import MapMOSNet

from mapmos.config import MapMOSConfig
from mapmos.mapmos_net import MapMOSNet
from mapmos.metrics import get_confusion_matrix, get_iou, get_precision, get_recall
from mapmos.utils.augmentation import (
rotate_point_cloud,
random_flip_point_cloud,
random_scale_point_cloud,
rotate_perturbation_point_cloud,
)

from mapmos.metrics import (
get_confusion_matrix,
get_iou,
get_precision,
get_recall,
rotate_point_cloud,
)


Expand Down
11 changes: 3 additions & 8 deletions src/mapmos/utils/pipeline_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@
# SOFTWARE.

import numpy as np
from kiss_icp.metrics import absolute_trajectory_error, sequence_error
from kiss_icp.tools.pipeline_results import PipelineResults
from kiss_icp.metrics import sequence_error, absolute_trajectory_error
from mapmos.metrics import (
get_stats,
get_iou,
get_recall,
get_f1,
get_precision,
)

from mapmos.metrics import get_f1, get_iou, get_precision, get_recall, get_stats


class MOSPipelineResults(PipelineResults):
Expand Down
Loading

0 comments on commit 1d2e22d

Please sign in to comment.