A python package Library which implement IA algorithims to detect cracks and failures on roads. The package is wrapper around all the models and provides an interfaces to use them properly
Project description
Pavimentados
Project Description
Pavimentados is a tool that allows the identification of pavement faults located on highways or roads, as well as vertical and horizontal signage. This library is an environment around the computer vision models developed to allow the detection of the different elements. The faults and detected elements are then used to generate metrics that help in road maintenance planning.
To use it you must contact the Inter-American Development Bank to obtain the credentials that give access to the models with which the API works.
These models require images or videos taken with the specifications that will be explained in later sections.
So far the system uses 4 models involved in different phases of detection and categorization.
Model Name | Description | Classes |
---|---|---|
Paviment failures | Detection of failures on the road and classifies it | 8 |
Signage detection | Detection of signage on the road | 2 |
Signage classification | Classifies the signage detected | 314 |
Signage State | Detect if the signage is in good or bad state | 3 |
To understand each model in detail see the models section.
Main Features
Some of the features now available are as follows:
- Scoring using the models already developed
- Workflows for image acquisition and assessment
- Evaluation of gps information to determine the location of faults and elements.
- Image or video support
- Support for GPS data in different formats (GPRRA, csv, embedded in image)
- Download models directly into the root of the package
Instalation
To install you can use the following commands
pip install pavimentados
Then to download the models use the following commands
from pavimentados import download_models
download_models(url = <signed_url>)
Or alternativily
from pavimentados import download_models
download_models(aws_access_key = <aws_access_key>, signature = <signature>, expires = <expiration_time>)
To obtain the corresponding credentials for downloading the models, please contact the Inter-American Development Bank at infradigital@iadb.org
You can also clone the repository but remember that the package is configured to download the models and place them in the root of the environment.
Quick Start
To make use of the tool import the components that create a workflow with images
from pavimentados.processing.processors import MultiImage_Processor
from pavimentados.processing.workflows import Workflow_Processor
In this example, we have the image processor object MultiImage_Processor, which is in charge of taking the images and analyzing them individually using the models. In addition, we have the Workflow_Processor object that is in charge of the image processing workflow.
Internally, the Workflow_Processor has objects that can interpret different image sources or GPS information.
Among the allowed image sources we have:
- image_routes: A list of image routes
- image_folder: a folder with all images
- images: images already loaded in numpy format
- video: The path to a video file
Among the allowed GPS data sources we have:
- image_routes: A list of the routes of the images that have the gps data embedded in them.
- image_folder: A folder with all the images that have the gps data embedded in them.
- loc: A file in GPRRA format
- csv: A gps file with the gps information in columns and rows.
Once these elements are imported, the processor is instantiated as follows
ml_processor = MultiImage_Processor(assign_devices = True, gpu_enabled = True)
The processor has the ability to allocate GPU usage automatically assuming that 6GB is available, it can be parameterized so that it is not automatically allocated, pass the allocation as a parameter, or even not work with the GPU.
You can modify the devices used according to the TensorFlow documentation regarding GPU usage (see https://www.tensorflow.org/guide/gpu)
The workflow object is able to receive the instantiated processor, without it it is not able to execute the workflow.
workflow = Workflow_Processor(route, image_source_type='image_folder', gps_source_type = 'image_folder')
The complete execution code would be as follows:
from pavimentados.processing.processors import MultiImage_Processor
from pavimentados.processing.workflows import Workflow_Processor
from pathlib import Path
### Image with the GPS data embebed
route = Path(<route with the images for processing>)
ml_processor = MultiImage_Processor(assign_devices = True, gpu_enabled = True)
workflow = Workflow_Processor(route, image_source_type='image_folder', gps_source_type = 'image_folder')
results = workflow.execute(ml_processor)
In results you will find the following:
- table_summary_sections: DataFrame with summary table by sections.
- data_resulting: DataFrame with results per frame
- data_resulting_fails: DataFrame with results by unique faults encountered.
- signals_summary: DataFrame with all the information about the signals.
- raw_results: Raw results totals
Autores
This package has been developed by:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pavimentados-0.21.0.tar.gz
.
File metadata
- Download URL: pavimentados-0.21.0.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4ae8bdd51a4b8482b147ccc52fabb39348ef6e101ff0840d9704d906d06038 |
|
MD5 | a27bf5f770982c8320ea48f962e1c324 |
|
BLAKE2b-256 | 6b69fc3c1226074ce9d25edd0ca9c4975e8f7ae3ba8b6274b8730d460044a5a1 |
File details
Details for the file pavimentados-0.21.0-py3-none-any.whl
.
File metadata
- Download URL: pavimentados-0.21.0-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 159744668be15139b11890b4eaa36ee12a121951f4e7e07ccf0e2fa19bf55f66 |
|
MD5 | 535b1fc7390f274c2be1f4ad0416aadb |
|
BLAKE2b-256 | f509bddcf2c8214c29846ea16ada5fa0eca32f5f6fcc920d4beb72cfefda0281 |