Name | viasegura JSON |
Version |
1.6
JSON |
| download |
home_page | |
Summary | A python package to interact with Inter-American Development Bank machine learning models to automatic label elements for iRAP certification |
upload_time | 2022-09-28 01:59:28 |
maintainer | |
docs_url | None |
author | Jose Maria Marquez Blanco |
requires_python | >=3.7 |
license | |
keywords |
machine learning
safe road
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[](https://pepy.tech/project/viasegura)
[](https://sonarcloud.io/summary/new_code?id=EL-BID_VIAsegura)


<h1 align="center"> VIAsegura</h1>
## Content Table:
---
- [Project Description](#project-description)
- [Main Features](#main-features)
- [Installation](#installation)
- [Using the Models](#using-the-models)
- [User's guides](#user-guide)
- [Autores](#autores)
- [License](#license)
## Project Description
---
VIAsegura is an API 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.
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 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 less.
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 adecuate 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 numebr 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
## Instalation
---
To install you can use the following commands
```
pip install viasegura
```
Then to download the models use the following commands
```
from viasegura import download_models
download_models(url = <signed_url>)
```
Or alternativily
```
from viasegura 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. You can change the locations manually as follows
```
from viasegura import download_models
download_models(url = <signed_url>, system_path = <new_working_path>)
```
Or alternativily
```
from viasegura import download_models
download_models(aws_access_key = <aws_access_key>, signature = <signature>, expires = <expiration_time>, system_path = <new_working_path>)
```
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
```
from viasegura import ModelLabeler
lateral_labeler = ModelLabeler('lateral')
```
Also you can especify 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')
```
## User Guide
You can see and entire example of use on [this link](https://colab.research.google.com/drive/1WltAaCCOnREcuLzI3PX_IKsnHNuRttEz?usp=sharing).
Also make sure to see the [manual](https://github.com/EL-BID/VIAsegura/tree/main/viasegura/manuals) 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)
## Autores
---
This package has been developed by:
<a href="https://github.com/J0s3M4rqu3z" target="blank">Jose Maria Marquez Blanco</a>
<br/>
<a href="https://www.linkedin.com/in/joancerretani/" target="blank">Joan Alberto Cerretani</a>
## License
The distribution of this software is according with the following [license](https://github.com/EL-BID/VIAsegura/blob/main/LICENSE.md)
Raw data
{
"_id": null,
"home_page": "",
"name": "viasegura",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "Machine Learning,safe road",
"author": "Jose Maria Marquez Blanco",
"author_email": "jose.marquez.blanco@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c5/49/c53286aefecee4e0cc2823b6b735feeff05262750914af54591a6ac117ce/viasegura-1.6.tar.gz",
"platform": null,
"description": "[](https://pepy.tech/project/viasegura)\n[](https://sonarcloud.io/summary/new_code?id=EL-BID_VIAsegura)\n\n\n<h1 align=\"center\"> VIAsegura</h1>\n\n## Content Table:\n---\n\n- [Project Description](#project-description)\n- [Main Features](#main-features)\n- [Installation](#installation)\n- [Using the Models](#using-the-models)\n- [User's guides](#user-guide)\n- [Autores](#autores)\n- [License](#license)\n\n\n\n## Project Description\n---\n\nVIAsegura is an API 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. \n\nTo 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.\n\nThese 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 less. \n\nSo far, 15 models compatible with the iRAP labeling specifications have been developed and are specified in the table below. \n\n\n| Model Name | Description | Type of Image | Classes |\n|------------------------|---------------------------------------------- | ------------- | ------- |\n| delineation | Adequacy of road lines | Frontal | 2 |\n| street lighting | Presence of street lighting | Frontal | 2 |\n| carriageway | Carriageway label for section | Frontal | 2 |\n| service road | Presence of a service road | Frontal | 2 |\n| road condition | Condition of the road surface | Frontal | 3 |\n| skid resistance | Skidding resistance | Frontal | 3 |\n| upgrade cost | Influence surroundings on cost of major works | Frontal | 3 |\n| speed management | Presence of features to reduce operating speed| Frontal | 3 |\n| bicycle facility | Presence of facilities for bicyclists | Frontal | 2 |\n| quality of curve | How adecuate is the curve | Frontal | 2 |\n| vehicle parking | Presence of parking on the road | Frontal | 2 |\n| property access points | Detects access to properties | Frontal | 2 |\n| area_type | Detects if there is an urban or rural area | Lateral | 2 |\n| land use | Describes the use of the land surrounding the road | Lateral | 4 |\n| number of lanes | The numebr of lanes detected | Frontal | 5 |\n\nSome of the models can identify all the classes or categories, others can help you sort through the available options.\n\n## Main Features\n---\n\nSome of the features now available are as follows:\n\n- Scoring using the models already developed\n- Grouping by groups of 5 images from an image list\n- Download models directly into the root of the package\n\n## Instalation\n---\n\nTo install you can use the following commands\n\n```\npip install viasegura\n\n```\n\nThen to download the models use the following commands\n\n```\nfrom viasegura import download_models\n\ndownload_models(url = <signed_url>)\n```\n\nOr alternativily\n\n```\nfrom viasegura import download_models\n\ndownload_models(aws_access_key = <aws_access_key>, signature = <signature>, expires = <expiration_time>)\n```\n\n\nTo obtain the corresponding credentials for downloading the models, please contact the Inter-American Development Bank at infradigital@iadb.org\n\nYou 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. You can change the locations manually as follows\n\n```\nfrom viasegura import download_models\n\ndownload_models(url = <signed_url>, system_path = <new_working_path>)\n```\n\nOr alternativily\n\n```\nfrom viasegura import download_models\n\ndownload_models(aws_access_key = <aws_access_key>, signature = <signature>, expires = <expiration_time>, system_path = <new_working_path>)\n```\n\n\nRemember to put that path every time you instantiate a model so that you can find the artifacts you need to run them.\n\n## Using the Models\n---\n\nIn order to make the instance of a model you can use the following commands\n\n```\nfrom viasegura import ModelLabeler\n\nlabeler = ModelLabeler(<type>) \n```\n\nYou can use either \"frontal\" or \"lateral\" tag in order to use the group of models desired (see table above)\n\n\nFor example, we can see both instance types:\n\n\n```\nfrom viasegura import ModelLabeler\n\nfrontal_labeler = ModelLabeler('frontal') \n```\n\nor \n\n```\nfrom viasegura import ModelLabeler\n\nlateral_labeler = ModelLabeler('lateral') \n```\n\nAlso you can especify which models to load using the parameter model filter and the name of the models to use, (see the table above):\n\n```\nfrom viasegura import ModelLabeler\n\nfrontal_labeler = ModelLabeler('frontal', model_filter = ['delineation', 'street_lighting', 'carriageway']) \n```\n\nIn addition, you can make it work using the GPU specifying the device where the models are going to run, for example\n\n```\nfrom viasegura import ModelLabeler\n\nfrontal_labeler = ModelLabeler('frontal', device='/device:GPU:0') \n```\n## User Guide\n\nYou can see and entire example of use on [this link](https://colab.research.google.com/drive/1WltAaCCOnREcuLzI3PX_IKsnHNuRttEz?usp=sharing).\n\nAlso make sure to see the [manual](https://github.com/EL-BID/VIAsegura/tree/main/viasegura/manuals) to understand the scope of the project and how to make a project from scratch using the viasegura models.\n\nYou can modify the devices used according to the TensorFlow documentation regarding GPU usage (see https://www.tensorflow.org/guide/gpu)\n\n## Autores\n---\n\nThis package has been developed by:\n\n<a href=\"https://github.com/J0s3M4rqu3z\" target=\"blank\">Jose Maria Marquez Blanco</a>\n<br/>\n<a href=\"https://www.linkedin.com/in/joancerretani/\" target=\"blank\">Joan Alberto Cerretani</a>\n\n## License\n\nThe distribution of this software is according with the following [license](https://github.com/EL-BID/VIAsegura/blob/main/LICENSE.md)\n",
"bugtrack_url": null,
"license": "",
"summary": "A python package to interact with Inter-American Development Bank machine learning models to automatic label elements for iRAP certification",
"version": "1.6",
"project_urls": null,
"split_keywords": [
"machine learning",
"safe road"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c0c5420c7f3bd13cffe490d74a9eecb54484943a6acbcbd4cc76d4ef18e25bee",
"md5": "a26fb991f12b4ef771f15bdec3ca5b2d",
"sha256": "18272bb032af76ed035f68eedd1dd473ccd11b927e8e7b0b609f76075eab1d75"
},
"downloads": -1,
"filename": "viasegura-1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a26fb991f12b4ef771f15bdec3ca5b2d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 27446,
"upload_time": "2022-09-28T01:59:26",
"upload_time_iso_8601": "2022-09-28T01:59:26.764210Z",
"url": "https://files.pythonhosted.org/packages/c0/c5/420c7f3bd13cffe490d74a9eecb54484943a6acbcbd4cc76d4ef18e25bee/viasegura-1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c549c53286aefecee4e0cc2823b6b735feeff05262750914af54591a6ac117ce",
"md5": "329c21ec36d56b970e04f6e5a5ae2490",
"sha256": "a9a746e87f3b4dd1049cc380d43d065f785912cfee4be8907b66431c73003bda"
},
"downloads": -1,
"filename": "viasegura-1.6.tar.gz",
"has_sig": false,
"md5_digest": "329c21ec36d56b970e04f6e5a5ae2490",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26065,
"upload_time": "2022-09-28T01:59:28",
"upload_time_iso_8601": "2022-09-28T01:59:28.950705Z",
"url": "https://files.pythonhosted.org/packages/c5/49/c53286aefecee4e0cc2823b6b735feeff05262750914af54591a6ac117ce/viasegura-1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-09-28 01:59:28",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "viasegura"
}