File size: 1,944 Bytes
1215771
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# monitoring-interface

## Requirements
```
pip install -r requiremnets.txt
```
To install Detectron2, please follow [here](https://detectron2.readthedocs.io/tutorials/install.html).
## Dataset Preparation
We use [Fiftyone](https://docs.voxel51.com) library to load and visualize datasets. 

BDD100k, COCO, KITTI and OpenImage can be loaded directly through [Fiftyone Datasets Zoo](https://docs.voxel51.com/user_guide/dataset_zoo/datasets.html?highlight=zoo).

For other datasets, such as NuScene can be loaded manually via the following simple pattern:
```python
import fiftyone as fo

# A name for the dataset
name = "my-dataset"

# The directory containing the dataset to import
dataset_dir = "/path/to/dataset"

# The type of the dataset being imported
dataset_type = fo.types.COCODetectionDataset  # for example

dataset = fo.Dataset.from_dir(
    dataset_dir=dataset_dir,
    dataset_type=dataset_type,
    name=name,
)
```
The custom dataset folder should have the following structure:
```
 └── /path/to/dataset
     |
     β”œβ”€β”€ Data
     └── labels.json
```
Notice that the annotation file `labels.json` should be prepared in COCO format.

## Interface demo

Three interfaces are provided:

- `interface.py`: all-in-1 interface
- `interface_tabbed.py`: tabbed interface
- `enlarge.py`: interface for monitor interval enlargement

To run any of these interfaces, just execute `python <script name.py>`. 

Please note that feature extraction for both training data and evaluation data can be a time-consuming process. However, if you are only interested in testing monitor construction, monitor evaluation, or monitoring demo, you can use the following settings to load a pretrained model along with the corresponding extracted features and monitors.

| ID    | Backbone | Clustering method for Monitors   |
| ----- | -------- | -------------------------------- |
| KITTI | ResNet   | KMeans(nb_clusters=[1, 4, 5, 6]) |