Skip to content

Commit ef4b0f6

Browse files
author
Vaibhav Balloli
committed
Initial commit
1 parent 6f0fb08 commit ef4b0f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+6793
-25
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Environment information**
27+
- OS: [e.g. Windows 11]
28+
- Python Version: [e.g. Python3.8]
29+
- Python Environment: [e.g. venv, conda, etc.]
30+
31+
**Additional context**
32+
Add any other context about the problem here.

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,3 +348,37 @@ MigrationBackup/
348348

349349
# Ionide (cross platform F# VS Code tools) working folder
350350
.ionide/
351+
352+
# HAMS
353+
log.out
354+
/dist
355+
__pycache__/
356+
hdf5.dll
357+
log.*
358+
*.out
359+
*.pyc
360+
docs/_build/
361+
*.mp4
362+
*.csv
363+
*.hog
364+
*.avi
365+
*.txt
366+
*.pth
367+
*.exe
368+
*.dll
369+
*.yml
370+
*.yaml
371+
*.toml
372+
test_*/
373+
out/
374+
data/
375+
*.jpg
376+
*.png
377+
.ipynb_checkpoints/
378+
379+
Dockerfile
380+
docker-compose.*
381+
GPL
382+
binaries
383+
output/
384+
*output*/

.gitkeep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
requirements.txt
2+
docs/requirements.txt
3+
docs/static/
4+
.github/

CITATION.cff

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
authors:
4+
- family-names: "Nambi"
5+
given-names: "Akshay"
6+
- family-names: "Mehta"
7+
given-names: "Ishit"
8+
- family-names: "Ghosh"
9+
given-names: "Anurag"
10+
- family-names: "Lingam"
11+
given-names: "Vijay"
12+
- family-names: "Padmanabhan"
13+
given-names: "Venkat"
14+
title: "ALT: Towards Automating Driver License Testing using Smartphones"
15+
version: 0.1.0
16+
doi: https://doi.org/10.1145/3356250.3360037
17+
date-released: 2017-12-18 #TODO
18+
url: "https://github.com/microsoft/HAMS"

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Project
1+
# HAMS ALT
22

3-
> This repo has been populated by an initial template to help get you started. Please
4-
> make sure to update the content to build a great experience for community-building.
3+
![LICENSE](https://img.shields.io/github/license/microsoft/HAMS?style=for-the-badge) [![Dashboard](https://img.shields.io/website?down_message=Dashboard%20Offline&style=for-the-badge&up_color=green&up_message=Dashboard&url=https%3A%2F%2Fhams-dashboard.westus3.cloudapp.azure.com%2F)](https://hams-dashboard.westus3.cloudapp.azure.com) [![Documentation](https://img.shields.io/badge/docs-Documentation-blue?style=for-the-badge&logo=appveyor)](https://microsoft.github.io/HAMS)
54

6-
As the maintainer of this project, please make a few updates:
5+
This project contains the core components of the Automated License Testing(ALT) system from the HAMS group at Microsoft Research, India.
76

8-
- Improving this README.MD file to provide a great experience
9-
- Updating SUPPORT.MD with content about this project's support experience
10-
- Understanding the security reporting process in SECURITY.MD
11-
- Remove this section from the README
7+
## Installation
8+
9+
1. Run `pip install git+https://github.com/microsoft/HAMS` to install the latest version
10+
2. Downlaod the binaries from the [HAMS Releases](https://github.com/microsoft/HAMS/releases)
11+
3. Refer to additional requirements and instructions on each of the modules in the `Tutorials` section of the [documentation](https://microsoft.github.io/HAMS).
1212

1313
## Contributing
1414

SUPPORT.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
1-
# TODO: The maintainer of this repo has not yet edited this file
2-
3-
**REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project?
4-
5-
- **No CSS support:** Fill out this template with information about how to file issues and get help.
6-
- **Yes CSS support:** Fill out an intake form at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). CSS will work with/help you to determine next steps.
7-
- **Not sure?** Fill out an intake as though the answer were "Yes". CSS will help you decide.
8-
9-
*Then remove this first heading from this SUPPORT.MD file before publishing your repo.*
10-
111
# Support
122

3+
Please use the instructions below to file issues related to this repository.
4+
135
## How to file issues and get help
146

15-
This project uses GitHub Issues to track bugs and feature requests. Please search the existing
16-
issues before filing new issues to avoid duplicates. For new issues, file your bug or
17-
feature request as a new Issue.
7+
This project uses GitHub Issues to track bugs. Please search the existing
8+
issues before filing new issues to avoid duplicates. For new issues, file your bug as a new Issue following the standard templates.
9+
10+
For help and questions about using this project, please email [Akshay Nambi](https://www.microsoft.com/en-us/research/people/akshayn/) at: [akshayn@microsoft.com](mailto:akshayn@microsoft.com)
1811

19-
For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE
20-
FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER
21-
CHANNEL. WHERE WILL YOU HELP PEOPLE?**.
12+
> Note: This project is not under active development, so no new feature requests will be added. Furthermore, please expect delay in response because of the same.
2213
2314
## Microsoft Support Policy
2415

25-
Support for this **PROJECT or PRODUCT** is limited to the resources listed above.
16+
Support for this **PROJECT** is limited to the resources listed above.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/about.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# About ALT
2+
3+
Inadequate driver skills and apathy towards/lack of awareness of safe driving practices are key contributing factors for the lack of road safety. The problem is exacerbated by the fact that the license issuing system is broken in India, with an estimated 59% of licenses issued without a test, making it a significant societal concern. The challenges arise from capacity and cost constraints, and corruption that plagues the driver testing process. While there have been efforts aimed at creating instrumented tracks to automate the license test, these have been stymied by the high cost of the infrastructure (e.g., pole-mounted high-resolution cameras looking down on the tracks) and poor test coverage (e.g., inability to monitor the driver inside the vehicle).
4+
5+
HAMS-based testing offers a compelling alternative. It is a low-cost and affordable system based on a windshield-mounted smartphone, though for reasons of scalability (i.e., handling a large volume of tests), we can offload computation to an onsite server or to the cloud. The view inside the vehicle also helps expand the test coverage. For instance, the test can verify that the driver taking the test is the same as the one who had registered for it (essential for protecting against impersonation), verify that the driver is wearing their seat belt (an essential safety precaution), and check whether the driver scans their mirrors before effecting a maneuver such as a lane change (an example of multimodal sensing, with inertial sensing and camera-based monitoring being employed in tandem).
6+
7+
HAMS-based testing allows the entire testing process to be performed without any human intervention. A test report, together with video evidence (to substantiate the test result in case of a dispute), is produced in an automated manner within minutes of the completion of the test. This manner of testing, with the test taken by the driver alone in the vehicle (i.e., no test inspector) has proved to be a boon in the context of the physical distancing norms arising from the COVID-19 pandemic.
8+
9+
## Deployments
10+
11+
To roll out HAMS-based driver testing, we first partnered with the Government of Uttarakhand and the Institute of Driving and Traffic Research (IDTR), run by Maruti-Suzuki. Testing is conducted on a track and includes a range of parameters including verification of driver identity, checking of the seat belt, fine-grained trajectory tracking during maneuvers such as negotiating a roundabout and performing parallel parking, and checking on mirror scanning during lane changing.
12+
13+
**HAMS-based driver license testing @ Dehradun, Uttarakhand:** [HAMS-based license testing went live at Dehradun Regional Transport Office (RTO)](https://news.microsoft.com/en-in/features/microsoft-ai-automates-drivers-license-test-india/), the capital of Uttarakhand state in July 2019. Till date, 10000+ automated tests (as of 15 Feb 2021) have been conducted, with an accuracy of 98%. The objectivity and transparency of the automated testing process has won the praise of not just the RTO staff but also the majority of the candidates, including many that failed the test. The thoroughness of HAMS-based testing is underscored by the fact that now the passing rate is only 54% compared to over 90% with the prior manual testing.
14+
15+
**Scaling HAMS deployments across India:** The success in Dehradun has spurred interest in HAMS-based automated testing across India and also overseas. RFPs issued by several states have called for capabilities such as continuous driver identification, gaze tracking, and mirror scan monitoring, that were not available before HAMS. HAMS-based testing has been rolled out in IDTR Aurangabad, Bihar, and is in process of being implemented at multiple RTOs across the country.
16+
17+
````{eval-rst}
18+
.. youtube:: zFuIP5hI4yU
19+
````
20+
21+
````{eval-rst}
22+
.. youtube:: XtgpWXM5Hfg
23+
````

docs/conf.py

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
# sys.path.insert(0, os.path.abspath('~/Microsoft/OLA-Alt/HAMSApp/'))
16+
# sys.path.insert(1, os.path.abspath('../'))
17+
# sys.path.append(os.path.abspath('/Users/balli/Microsoft/'))
18+
# sys.path.append(os.path.abspath('/Users/balli/Microsoft/Ola-ALT/'))
19+
# sys.path.append(os.path.abspath('/Users/balli/Microsoft/Ola-ALT/HAMSApp/'))
20+
# sys.path.append(os.path.abspath('/Users/balli/Microsoft/Ola-ALT/HAMSApp/ALT/'))
21+
sys.path.append('../')
22+
# sys.path.insert(2, os.path.abspath('../../'))
23+
# sys.path.insert(3, os.path.abspath('../../'))
24+
25+
26+
# -- Project information -----------------------------------------------------
27+
28+
project = 'HAMS'
29+
copyright = '2023, Microsoft Research'
30+
author = 'Anurag Ghosh, Harsh Vijay, Vaibhav Balloli, Jonathan Samuel, Akshay Nambi'
31+
32+
# The full version, including alpha/beta/rc tags
33+
release = '0.1'
34+
35+
36+
# -- General configuration ---------------------------------------------------
37+
38+
# Add any Sphinx extension module names here, as strings. They can be
39+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
40+
# ones.
41+
extensions = [
42+
"sphinx.ext.autodoc",
43+
"sphinx.ext.intersphinx",
44+
"sphinx.ext.viewcode",
45+
"sphinx.ext.doctest",
46+
"sphinx.ext.autosummary",
47+
"sphinx.ext.todo",
48+
"sphinx.ext.coverage",
49+
"sphinx.ext.mathjax",
50+
"sphinx.ext.napoleon",
51+
"sphinx.ext.autosectionlabel",
52+
"sphinxemoji.sphinxemoji",
53+
"breathe",
54+
"sphinx_markdown_builder",
55+
"sphinx_copybutton",
56+
"jupyter_sphinx",
57+
# "myst_nb",
58+
"myst_parser",
59+
"sphinx_proof",
60+
"sphinx_design",
61+
"sphinxcontrib.video",
62+
"sphinx_togglebutton",
63+
"sphinx_tabs.tabs",
64+
"nbsphinx",
65+
"sphinxcontrib.youtube",
66+
]
67+
autodoc_typehints = "description"
68+
autodoc_class_signature = "separated"
69+
autosummary_generate = True
70+
autodoc_default_options = {
71+
"members": True,
72+
"inherited-members": True,
73+
"show-inheritance": False,
74+
}
75+
autodoc_inherit_docstrings = True
76+
myst_enable_extensions = ["colon_fence"]
77+
78+
nb_execution_mode = "off"
79+
nbsphinx_allow_errors = True
80+
nbsphinx_execute = "never"
81+
82+
# Add any paths that contain templates here, relative to this directory.
83+
templates_path = ["_templates"]
84+
85+
# List of patterns, relative to source directory, that match files and
86+
# directories to ignore when looking for source files.
87+
# This pattern also affects html_static_path and html_extra_path.
88+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
89+
90+
html_theme_options = {
91+
"repository_url": "https://github.com/microsoft/HAMS",
92+
"use_repository_button": True,
93+
"use_download_button": True,
94+
}
95+
96+
html_title = "HAMS Docs"
97+
# -- Options for HTML output -------------------------------------------------
98+
99+
# The theme to use for HTML and HTML Help pages. See the documentation for
100+
# a list of builtin themes.
101+
#
102+
# html_theme = "furo"
103+
html_theme = "sphinx_book_theme"
104+
105+
# removes the .txt suffix
106+
html_sourcelink_suffix = ""
107+
108+
109+
# Add any paths that contain custom static files (such as style sheets) here,
110+
# relative to this directory. They are copied after the builtin static files,
111+
# so a file named "default.css" will overwrite the builtin "default.css".
112+
html_static_path = ["static"]
113+
# source_suffix = ['.rst', '.md']
114+
115+
autodoc_mock_imports = ['alabaster', 'amqp', 'anacondaclient', 'anacondaproject', 'anyjson', 'apscheduler', 'asncrypto', 'astroid', 'astropy', 'atomicwrites', 'attrs', 'autobahn', 'automat', 'babel', 'backcall', 'backportsos', 'backportsshutilgetterminalsize', 'bcrypt', 'beautifulsoup', 'billiard', 'bitarray', 'bkcharts', 'bleach', 'bokeh', 'boto', 'bottleneck', 'celery', 'celluloid', 'certifi', 'cffi', 'chardet', 'click', 'cloudpickle', 'clyent', 'cognitiveface', 'colorama', 'comtypes', 'constantly', 'contextlib', 'cryptography', 'cycler', 'cython', 'cytoolz', 'dask', 'decorator', 'defusedxml', 'distributed', 'dlib', 'dnspython', 'docutils', 'entrypoints', 'etxmlfile', 'eventlet', 'fastcache', 'filelock', 'filterpy', 'flask', 'flaskbcrypt', 'flasklogin', 'flaskmarshmallow', 'flasksession', 'flasksqlacodegen', 'flasksqlalchemy', 'flaskwkhtmltopdf', 'gevent', 'greenlet', 'hpy', 'haversine', 'heapdict', 'hexdump', 'hkdf', 'htmllib', 'humanize', 'hyperlink', 'idna', 'imageio', 'imagesize', 'importlibmetadata', 'incremental', 'inflect', 'ipykernel', 'ipython', 'ipythongenutils', 'ipywidgets', 'isort', 'itsdangerous', 'jdcal', 'jedi', 'jinja', 'jsonschema', 'jupyter', 'jupyterclient', 'jupyterconsole', 'jupytercore', 'jupyterlab', 'jupyterlabserver', 'keyring', 'kiwisolver', 'kombu', 'laika', 'lazyobjectproxy', 'libusb', 'llvmlite', 'locket', 'lxml', 'markupsafe', 'marshmallow', 'marshmallowsqlalchemy', 'matplotlib', 'mccabe', 'menuinst', 'mistune', 'mklfft', 'mklrandom', 'monotonic', 'moreitertools', 'mpmath', 'msgpack', 'multipledispatch', 'mysqlconnector', 'nbconvert', 'nbformat', 'networkx', 'nltk', 'nose', 'notebook', 'numba', 'numexpr', 'numpy', 'numpydoc', 'olefile', 'opencvcontribpython', 'openpyxl', 'packaging', 'pandas', 'pandocfilters', 'parso', 'partd', 'pathpy', 'pathlib', 'patsy', 'pdfkit', 'pep', 'pickleshare', 'pillow', 'pip', 'pluggy', 'ply', 'prometheusclient', 'prompttoolkit', 'psutil', 'py', 'pycodestyle', 'pycosat', 'pycparser', 'pycrypto', 'pycurl', 'pyflakes', 'pygments', 'pyhamcrest', 'pylint', 'pymysql', 'pynacl', 'pyodbc', 'pyopenssl', 'pyparsing', 'pyquaternion', 'pyreadline', 'pyrsistent', 'pysocks', 'pytest', 'pytestarraydiff', 'pytestastropy', 'pytestdoctestplus', 'pytestopenfiles', 'pytestremotedata', 'pythondateutil', 'pytz', 'pywavelets', 'pywin', 'pywinctypes', 'pywinpty', 'pyyaml', 'pyzmq', 'qtawesome', 'qtconsole', 'qtpy', 'redis', 'requests', 'rope', 'ruamelyaml', 'scikitimage', 'scikitlearn', 'scipy', 'seaborn', 'sendtrash', 'setuptools', 'shapelypost', 'simplegeneric', 'singledispatch', 'six', 'snowballstemmer', 'sortedcollections', 'sortedcontainers', 'soupsieve', 'sphinx', 'sphinxcontribwebsupport', 'spyder', 'spyderkernels', 'sqlalchemy', 'statsmodels', 'sympy', 'tables', 'tblib', 'terminado', 'testpath', 'toolz', 'tornado', 'tqdm', 'traitlets', 'txaio', 'typedast', 'tzlocal', 'unicodecsv', 'urllib', 'vine', 'wcwidth', 'webencodings', 'werkzeug', 'wfastcgi', 'wheel', 'widgetsnbextension', 'wincertstore', 'wininetpton', 'winunicodeconsole', 'wrapt', 'xlrd', 'xlsxwriter', 'xlwings', 'xlwt', 'zict', 'zipp', 'zopeinterface', 'mysql']
116+
117+
autodoc_mock_imports += ['ffmpeg', 'flask_sqlalchemy', 'flask_bcrypt', 'flask_cors', 'flask_session', 'sqlalchemy_utils', 'cv2', 'PIL', 'torch', 'torchvision', 'reporter', 'cognitive_face', 'shapely', 'sklearn', 'moviepy', 'natsort' ,'decord', 'hydra', 'typer', 'omegaconf', 'mapping_cli']

docs/dashboard.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Dashboard
2+
3+
We have a live dashboard that shows the current deployment of the HAMS ALT systems across India and an aggregate monthly statistics of the tests occuring here.
4+
You can visit the website from [aka.ms/hams-dashboard](https://aka.ms/hams-dashboard)
5+
6+
7+
![HAMS ALT Dashboard](static/hams_dashboard.jpeg)

0 commit comments

Comments
 (0)