Skip to main content

A python package to interact with Inter-American Development Bank machine learning models to automatic label elements for iRAP certification

Project description

VIAsegura

Automatic labeling of road safety attributes

analytics image (flat) Downloads

Content Table:


Project Description


VIAsegura is a library that helps to use artificial intelligence models developed by the Inter-American Development Bank to automatically tag items on the streets. The tags it places are some of those needed to implement the iRAP road safety methodology.

These models require images with the specifications of the iRAP projects. This means that they have been taken every 20 meters along the entire path to be analyzed. In addition, some of the models require images to be taken from the front and others from the side of the car. The models yield 1 result for each model for groups of 5 images or fewer.

So far, 15 models compatible with the iRAP labeling specifications have been developed and are specified in the table below.

Model Name Description Type of Image Classes
delineation Adequacy of road lines Frontal 2
street_lighting Presence of street lighting Frontal 2
carriageway Carriageway label for section Frontal 2
service_road Presence of a service road Frontal 2
road_condition Condition of the road surface Frontal 3
skid_resistance Skidding resistance Frontal 3
upgrade_cost Influence surroundings on cost of major works Frontal 3
speed_management Presence of features to reduce operating speed Frontal 3
bicycle_facility Presence of facilities for bicyclists Frontal 2
quality_of_curve How adequate is the curve Frontal 2
vehicle_parking Presence of parking on the road Frontal 2
property_access_points Detects access to properties Frontal 2
area_type Detects if there is an urban or rural area Lateral 2
land_use Describes the use of the land surrounding the road Lateral 4
number_of_lanes The number of lanes detected Frontal 5

Some of the models can identify all the classes or categories, others can help you sort through the available options.

Main Features


Some of the features now available are as follows:

  • Scoring using the models already developed
  • Grouping by groups of 5 images from an image list
  • Download models directly into the root of the package

Quick Start


Installation

To install you can use the following commands

pip install viasegura

Then to download the models from the repository to ...

Remember to put that path every time you instantiate a model so that you can find the artifacts you need to run them.

Using the Models

In order to make the instance of a model you can use the following commands

from viasegura import ModelLabeler

labeler = ModelLabeler(<type>) 

You can use either "frontal" or "lateral" tag in order to use the group of models desired (see table above)

For example, we can see both instance types:

from viasegura import ModelLabeler

frontal_labeler = ModelLabeler('frontal')  # or 'lateral' 

Also, you can specify which models to load using the parameter model filter and the name of the models to use, (see the table above):

from viasegura import ModelLabeler

frontal_labeler = ModelLabeler('frontal', model_filter=['delineation', 'street_lighting', 'carriageway']) 

In addition, you can make it work using the GPU specifying the device where the models are going to run, for example

from viasegura import ModelLabeler

frontal_labeler = ModelLabeler('frontal', device='/device:GPU:0') 

Users Guide

You can see and entire example of use on this notebook on 'notebooks' folder.

Also make sure to see the manual to understand the scope of the project and how to make a project from scratch using the viasegura models.

You can modify the devices used according to the TensorFlow documentation regarding GPU usage ( see https://www.tensorflow.org/guide/gpu)

Authors

This package has been developed by:

Jose Maria Marquez Blanco
Joan Alberto Cerretani
Victor Durand

License

The distribution of this software is according to the following license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

viasegura-2.0.0.dev8.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

viasegura-2.0.0.dev8-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file viasegura-2.0.0.dev8.tar.gz.

File metadata

  • Download URL: viasegura-2.0.0.dev8.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for viasegura-2.0.0.dev8.tar.gz
Algorithm Hash digest
SHA256 f3e99d0db9f56cc266db6640a599d14d9f495a75e7e84faeaa583acb8b83d6a8
MD5 03c6ae1424d54d7647ee1aa4b9b590b6
BLAKE2b-256 03d6f1cc9f872372a9e034053af5269de81e252c370b7208d6e0e68af42e8fac

See more details on using hashes here.

File details

Details for the file viasegura-2.0.0.dev8-py3-none-any.whl.

File metadata

  • Download URL: viasegura-2.0.0.dev8-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for viasegura-2.0.0.dev8-py3-none-any.whl
Algorithm Hash digest
SHA256 91d74d4550b3baec3f4f59517a9643f4e7c71aec5e6ad2c7ebcf7f98212f9c37
MD5 54024f603cef2e0e0bce4e2efb038f4a
BLAKE2b-256 8bddf4ed9faaee5f3c46a7ba926077c84d10810a1d47ff3d4f5c9824d95f36a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page