A deeplearning package for the basegun weapon recongition app
Project description
Project description
Basegun_ml is a deeplearning package for the basegun weapon recongition app.
Usage
Classification
from basegunML.classification import get_typology, list_typologies
#After the import the model is already warmed-up for faster inference
#Convert image to bytes
with open("test.jpg", "rb") as file:
image_bytes = file.read()
#Prediction of the weapon typology
typology,confidence_score,confidence_level=get_typology(image_bytes)
#Obtain the list of the different typologies
list_typologies()
Variables description
Measure length
from basegunML.measure import get_lengths
#Convert image to bytes
with open("test.jpg", "rb") as file:
image_bytes = file.read()
#Get lengths
weapon_length,barrel_length,confidence_card=get_lengths(image_bytes)
Variables description
Tests
Tests are available for the classification task and the measure length task
pytest tests/test_classification.py
pytest tests/test_measure.py
Credits
- This project uses the Ultralytics Library
- The oriented bounding box detection is inspired from this YOLOV5 implementation
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
basegun_ml-1.0.tar.gz
(15.1 MB
view hashes)
Built Distribution
basegun_ml-1.0-py3-none-any.whl
(15.1 MB
view hashes)