dthh commited on
Commit
bea220b
·
verified ·
1 Parent(s): f000f4b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +67 -10
README.md CHANGED
@@ -1,25 +1,82 @@
1
- # SurfaceAI: pipeline for surface type and quality classification of road networks
2
 
3
- This repository provides the models weights and parameters for the SurfaceAI pipeline.
4
- The model version specified in the config file of the pipeline are automatically downloaded from this repo during the execution of the code, if not already available locally.
5
 
6
- Find the [paper](https://dl.acm.org/doi/10.1145/3681780.3697277) of this publication and the [code](https://github.com/SurfaceAI/road_network_classification) here.
 
 
 
7
 
8
- This is part of the SurfaceAI project at the University of Applied Sciences, HTW Berlin.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
 
10
 
11
- **Content**: The models are sorted in folders according to version.
12
- Each version folder contains all models required for the pipeline and, if applicable, documentation of the training parameters.
 
13
  The current version is v1.
14
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- **Contact**: surface-ai@htw-berlin.de
17
 
18
  https://surfaceai.github.io/surfaceai/
19
 
20
 
21
- **Citation**: To cite this work, please refer to the [paper](https://dl.acm.org/doi/10.1145/3681780.3697277).
 
 
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- **Funding**: SurfaceAI is a mFund project funded by the Federal Ministry for Digital and Transportation Germany.
25
 
 
 
 
1
+ # SurfaceAI: models for road type, surface type and quality classification of street-level imagery
2
 
3
+ This repository provides the python code as well as the model files with weights and parameters of the SurfaceAI models.
 
4
 
5
+ The models are designed to infer the following information from street-level images:
6
+ - **Road type** (e.g., road, bike lane, cycleway, footway, (unspedified) path, no focus/no street)
7
+ - **Surface type** (asphalt, concrete, paving stones, sett, unpaved)
8
+ - **Surface quality**, where a dedicated model is used for each surface type
9
 
10
+ Currently, the models are based on Convolutional Neural Networks (CNNs) and there is a separate model for each task, which can be expanded to include other architectures in future versions. Road type und surface type are classification tasks, surface quality is considered as a regression.
11
+
12
+ **Example usage**:
13
+ The file `prediction_example.py` demonstrates how to process images to generate predictions. The model interface `ModelInterface` from file `Models.py` is initialized with a configuration dictionary including the desired model files. Only tasks for which a model is defined are performed. The prediction of images is performed by the method `batch_classifications`, which takes a list of PIL Images or NumPy Arrays.
14
+
15
+ Using the example prediction file, the output of the classification method for the image ![example_image](example_images/IMG_20210226_172956.jpg) is a list
16
+
17
+ ```
18
+ [
19
+ 'IMG_20210226_172956',
20
+ '1_1_road__1_1_road_general',
21
+ [3.061619645450264e-05, 0.9993541836738586, 1.4675654711027164e-05, 3.29997310473118e-05, 0.0003072938707191497, 5.346190690147523e-08, 0.00018766717403195798, 7.268250919878483e-05],
22
+ 'asphalt',
23
+ [0.9866762757301331, 0.0002866282011382282, 0.00020359903282951564, 7.299235585378483e-05, 0.012760424986481667],
24
+ 'good',
25
+ 2.2281060218811035
26
+ ]
27
+ ```
28
+
29
+ with:
30
+ 1. image id provided to the model
31
+ 2. road type prediction
32
+ 3. list of probability scores of all possible road types
33
+ 4. surface type prediction
34
+ 5. list of probability scores of all possible surface types
35
+ 6. surface qualiy prediction
36
+ 7. value of surface quality prediction
37
 
38
+ Note: When handling large numbers of images, it is the user’s responsibility to split the images into suitable batch sizes before passing them to the batch_classification method in order to avoid memory overflows. The optimal batch size depends on the available GPU or CPU memory capacity and should be tested accordingly.
39
 
40
+
41
+ **Folder structure**:
42
+ The model files are sorted in folders according to version, including a json file containing metadata of all models. The transformations used for training are recommended for prediction and are contained in the metadata file.
43
  The current version is v1.
44
 
45
+ **Training Data**:
46
+ The surface type and quality models are trained on the dataset StreetSurfaceVis. See respective [paper](
47
+ https://doi.org/10.48550/arXiv.2407.21454).
48
+
49
+ **Application**:
50
+ The models are used in SurfaceAI pipeline. See respective [paper](https://dl.acm.org/doi/10.1145/3681780.3697277) and [code](https://github.com/SurfaceAI/road_network_classification).
51
+
52
+
53
+ **Contact**:
54
+ This is part of the SurfaceAI project at the University of Applied Sciences, HTW Berlin.
55
 
56
+ surface-ai@htw-berlin.de
57
 
58
  https://surfaceai.github.io/surfaceai/
59
 
60
 
61
+ **Citation**:
62
+ If you use these models please cite as:
63
+ ```
64
 
65
+ @article{kapp_streetsurfacevis_2025,
66
+ title = {{StreetSurfaceVis}: a dataset of crowdsourced street-level imagery annotated by road surface type and quality},
67
+ author = {Kapp, Alexandra and Hoffmann, Edith and Weigmann, Esther and Mihaljević, Helena},
68
+ volume = {12},
69
+ issn = {2052-4463},
70
+ url = {https://doi.org/10.1038/s41597-024-04295-9},
71
+ doi = {10.1038/s41597-024-04295-9},
72
+ number = {1},
73
+ journal = {Scientific Data},
74
+ month = jan,
75
+ year = {2025},
76
+ pages = {92},
77
+ }
78
+ ```
79
 
 
80
 
81
+ **Funding**:
82
+ SurfaceAI is a mFund project funded by the Federal Ministry for Digital and Transportation Germany.