Spaces:
Running
Running
Fix in KITTI sequential
Browse files- README.md +15 -6
- maploc/data/sequential.py +3 -1
- maploc/evaluation/run.py +1 -1
README.md
CHANGED
|
@@ -113,16 +113,16 @@ python -m maploc.evaluation.mapillary [...] --output_dir ./viz_MGL/ --num 100
|
|
| 113 |
To run the evaluation in sequential mode:
|
| 114 |
|
| 115 |
```bash
|
| 116 |
-
python -m maploc.evaluation.mapillary --experiment OrienterNet_MGL --sequential
|
| 117 |
```
|
| 118 |
The results should be close to the following:
|
| 119 |
```
|
| 120 |
Recall xy_seq_error: [29.73, 73.25, 91.17] at (1, 3, 5) m/°
|
| 121 |
Recall yaw_seq_error: [46.55, 88.3, 96.45] at (1, 3, 5) m/°
|
| 122 |
```
|
| 123 |
-
The sequential evaluation uses 10 frames by default. To increase this number:
|
| 124 |
```bash
|
| 125 |
-
python -m maploc.evaluation.mapillary [...]
|
| 126 |
```
|
| 127 |
|
| 128 |
|
|
@@ -142,7 +142,7 @@ python -m maploc.data.kitti.prepare
|
|
| 142 |
2. Run the evaluation with the model trained on MGL:
|
| 143 |
|
| 144 |
```bash
|
| 145 |
-
python -m maploc.evaluation.kitti --experiment OrienterNet_MGL
|
| 146 |
```
|
| 147 |
|
| 148 |
You should expect the following results:
|
|
@@ -155,9 +155,18 @@ Recall yaw_max_error: [29.22, 68.2, 84.49] at (1, 3, 5) m/°
|
|
| 155 |
You can similarly export some visual examples:
|
| 156 |
|
| 157 |
```bash
|
| 158 |
-
python -m maploc.evaluation.kitti [...] --output_dir ./viz_KITTI/ --num 100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
```
|
| 160 |
-
To run in sequential mode, similarly add the `--sequential` flag.
|
| 161 |
|
| 162 |
</details>
|
| 163 |
|
|
|
|
| 113 |
To run the evaluation in sequential mode:
|
| 114 |
|
| 115 |
```bash
|
| 116 |
+
python -m maploc.evaluation.mapillary --experiment OrienterNet_MGL --sequential model.num_rotations=256
|
| 117 |
```
|
| 118 |
The results should be close to the following:
|
| 119 |
```
|
| 120 |
Recall xy_seq_error: [29.73, 73.25, 91.17] at (1, 3, 5) m/°
|
| 121 |
Recall yaw_seq_error: [46.55, 88.3, 96.45] at (1, 3, 5) m/°
|
| 122 |
```
|
| 123 |
+
The sequential evaluation uses 10 frames by default. To increase this number, add:
|
| 124 |
```bash
|
| 125 |
+
python -m maploc.evaluation.mapillary [...] chunking.max_length=20
|
| 126 |
```
|
| 127 |
|
| 128 |
|
|
|
|
| 142 |
2. Run the evaluation with the model trained on MGL:
|
| 143 |
|
| 144 |
```bash
|
| 145 |
+
python -m maploc.evaluation.kitti --experiment OrienterNet_MGL model.num_rotations=256
|
| 146 |
```
|
| 147 |
|
| 148 |
You should expect the following results:
|
|
|
|
| 155 |
You can similarly export some visual examples:
|
| 156 |
|
| 157 |
```bash
|
| 158 |
+
python -m maploc.evaluation.kitti [...] --output_dir ./viz_KITTI/ --num 100
|
| 159 |
+
```
|
| 160 |
+
|
| 161 |
+
To run in sequential mode:
|
| 162 |
+
```bash
|
| 163 |
+
python -m maploc.evaluation.kitti --experiment OrienterNet_MGL --sequential model.num_rotations=256
|
| 164 |
+
```
|
| 165 |
+
with results:
|
| 166 |
+
```
|
| 167 |
+
Recall directional_seq_error: [[81.94, 97.35, 98.67], [52.57, 95.6, 97.35]] at (1, 3, 5) m/°
|
| 168 |
+
Recall yaw_seq_error: [82.7, 98.63, 99.06] at (1, 3, 5) m/°
|
| 169 |
```
|
|
|
|
| 170 |
|
| 171 |
</details>
|
| 172 |
|
maploc/data/sequential.py
CHANGED
|
@@ -15,7 +15,9 @@ def chunk_sequence(
|
|
| 15 |
max_inter_dist=None,
|
| 16 |
max_total_dist=None,
|
| 17 |
):
|
| 18 |
-
sort_array = data.get("capture_time", data.get("index"
|
|
|
|
|
|
|
| 19 |
indices = sorted(indices, key=lambda i: sort_array[i].tolist())
|
| 20 |
centers = torch.stack([data["t_c2w"][i][:2] for i in indices]).numpy()
|
| 21 |
dists = np.linalg.norm(np.diff(centers, axis=0), axis=-1)
|
|
|
|
| 15 |
max_inter_dist=None,
|
| 16 |
max_total_dist=None,
|
| 17 |
):
|
| 18 |
+
sort_array = data.get("capture_time", data.get("index"))
|
| 19 |
+
if sort_array is None:
|
| 20 |
+
sort_array = indices if names is None else names
|
| 21 |
indices = sorted(indices, key=lambda i: sort_array[i].tolist())
|
| 22 |
centers = torch.stack([data["t_c2w"][i][:2] for i in indices]).numpy()
|
| 23 |
dists = np.linalg.norm(np.diff(centers, axis=0), axis=-1)
|
maploc/evaluation/run.py
CHANGED
|
@@ -109,7 +109,7 @@ def evaluate_sequential(
|
|
| 109 |
progress: bool = True,
|
| 110 |
num_rotations: int = 512,
|
| 111 |
mask_index: Optional[Tuple[int]] = None,
|
| 112 |
-
has_gps: bool =
|
| 113 |
):
|
| 114 |
chunk_keys = list(chunk2idx)
|
| 115 |
if shuffle:
|
|
|
|
| 109 |
progress: bool = True,
|
| 110 |
num_rotations: int = 512,
|
| 111 |
mask_index: Optional[Tuple[int]] = None,
|
| 112 |
+
has_gps: bool = False,
|
| 113 |
):
|
| 114 |
chunk_keys = list(chunk2idx)
|
| 115 |
if shuffle:
|