Skip to main content

An AI enabled program to detect car speed

Project description

Sheriff : An AI enabled program to detect car speed

Python Status License

What is it?

Road accidents, A very common problem, but still nobody is using Al technology to solve it, so I decided to make a program to solve it, Sheriff - An Al enabled program to detect car speed and to prevent road accidents, it will detect which car is overspeeding the speed limit and we can fine some charge to the driver, if the car is overspeeding, with Sheriff we can check which car was in overspeed or underspeed by checking the report.log file generated by the program, and it will also save the images of cars which were in overspeed, in a folder, to detect the speed, you have to select the video file and then it will start doing the process.

Main Features

Here are just a few of the things that Sheriff does well:

  • Detect car speed using speed=distance/time formula.
  • You can detect car speed from any video file.
  • UI made with PyQt5.

We know these features are not enough to make a change, but we are trying to improve Sheriff, and hopefully we will reach our goal soon

Where to get it?

The source code is currently hosted on GitHub at: https://github.com/Programming-Hero-1313/Sheriff

Package

Links

Package Installation

pip install sheriff

Package Features

  • Check version
  • Run the GUI
from sheriff import *
import sheriff

# Check Sheriff version -
print(sheriff.version())

# Run the GUI -
gui.run()

What's new in v1.6

  • Fixed Issue #3
  • Dependencies, dlib and cmake removed from install_requires attribute in setup.py. Now the user have to manually install he dlib module, for that the user have to install cmake gui from here and cmake library from here or run pip install cmake in Powershell. and the user have to install dlib module by running pip install dlib in Powershell.

What's new in v1.5

  • Added change notes in package/README.md
  • Added LICENSE.txt & README.md in MANIFEST.in

What's new in v1.4

  • Bug Fixed : Dependencies not installing.

What's new in v1.3

  • Changed gui_data directory name to .gui_data, so that it will be hidden when you run the ls or list command in package.
  • Bug Fixed - Window icon not showing on open-cv feed window in package.

What's new in v1.2

  • Fixed error -
    Traceback (most recent call last): File "C:\python\lib\site-packages\sheriff\gui.py", line 147, in browsefiles trackMultipleObjects() File "C:\python\lib\site-packages\sheriff\gui.py", line 233, in __init__ root.iconbitmap("gui_data/res/logo.ico") File "C:\python\lib\tkinter\__init__.py", line 2109, in wm_iconbitmap return self.tk.call('wm', 'iconbitmap', self._w, bitmap) _tkinter.TclError: bitmap "gui_data/res/logo.ico" not defined
    
  • Bug Fixed - Images not showing on home screen like icon, logo.

Dependencies

Installation

You can install the all requirements from requirements.txt by using pip.

pip install -r requirements.txt

Clone the repository

git clone https://github.com/Programming-Hero-1313/Sheriff.git

Usage

python scripts/main.py

Video Tutorial for Sheriff Usage

Enter the speed Limit

  • Enter the Speed Limit in the input box you want to set

Click On Start Button

  • Click on Start Button and select the video file

    Now Sheriff should Start detecting car speed from the provided video Do the following steps when the detection is complete If you are facing any errors feel free to contact me.

Navigate to overspeeding directory

  • Navigate to Overspeeding directory to see the report

Navigate to overspeeding/cars directory

  • Navigate to cars directory located in overspeeding directory to see the images of cars which were overspeeding

Contact

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

sheriff-1.6.tar.gz (124.0 kB view details)

Uploaded Source

Built Distribution

sheriff-1.6-py3-none-any.whl (121.1 kB view details)

Uploaded Python 3

File details

Details for the file sheriff-1.6.tar.gz.

File metadata

  • Download URL: sheriff-1.6.tar.gz
  • Upload date:
  • Size: 124.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for sheriff-1.6.tar.gz
Algorithm Hash digest
SHA256 901073bd228df85836d251b626cdd899e432d368e512c573c782364ff2ded81f
MD5 b21834f55da37f774f9559cc3f33a7c8
BLAKE2b-256 950289031de028735c612df884b5c9148721859c4293dddb9b633318a56432b4

See more details on using hashes here.

File details

Details for the file sheriff-1.6-py3-none-any.whl.

File metadata

  • Download URL: sheriff-1.6-py3-none-any.whl
  • Upload date:
  • Size: 121.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for sheriff-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c61a475d951e6040933d3ba981b2baa10073287f8fe197214591f00683806a65
MD5 fd7c1a451e3841b457995f9a740cc594
BLAKE2b-256 2e9290be021b2d1d56628ca8694774e0d24d061d6f90701e706f88c9ff0fdd0b

See more details on using hashes here.

Supported by

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