Spaces:
Build error
Build error
| license: mit | |
| title: monitoringInterface | |
| sdk: gradio | |
| emoji: π | |
| colorFrom: purple | |
| colorTo: purple | |
| # 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]) | |