Skip to content

Commit

Permalink
Merge pull request #25 from dnum-mi/Cleaning-structure
Browse files Browse the repository at this point in the history
Cleaning structure
  • Loading branch information
AurelienmartW authored Oct 1, 2024
2 parents 31001e0 + 2b92e8e commit 99cb5bd
Show file tree
Hide file tree
Showing 86 changed files with 1,725 additions and 726 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ __pycache__
*.csv
models/
ignore/
MLpackages/basegun_ml/dist
package/basegun_ml/dist
*.egg-info/
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ repos:
hooks:
# Run ruff with isort formatter
- id: ruff
types_or: [ python, pyi ]
args: [ "--select", "I", "--fix" ]
# Run ruff
- id: ruff
types_or: [ python, pyi ]
args: [ "--fix" ]
# Run the formatter.
- id: ruff-format
- id: ruff-format
types_or: [ python, pyi ]
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
[![PyPI](https://img.shields.io/pypi/v/basegun-ml)](https://pypi.org/project/basegun-ml/)
![GitHub License](https://img.shields.io/github/license/dnum-mi/basegun-ml)

# Basegun-ml

Code for creating the neural networks used in repo [Basegun](https://github.com/dnum-mi/Basegun) and in website [basegun](https://basegun.interieur.gouv.fr/) .
Check out [our wiki](https://github.com/dnum-mi/Basegun-ml/wiki) to learn more about the research for this code !
* [Classification](https://github.com/dnum-mi/Basegun-ml/tree/master/classification): code for training image classifier neural networks.
* [Measure module](https://github.com/dnum-mi/Basegun-ml/tree/master/measure_module): code for training the measure module algorithms to determine the weapon length and barrel length
* [MLpackage](https://github.com/dnum-mi/Basegun-ml/tree/master/MLpackage): code of the basegun_ml package
The Basegun-ml repository contains all the research code based on Machine Learning (ML) used in the [Basegun app](https://github.com/dnum-mi/Basegun), a tool designed to assist in the identification and legal categorization of firearms in France.

The repository includes two main folders:

- **Package Folder**: This contains the Python package used by the Basegun backend to run various machine learning algorithms. The package is available on pip:
```
pip install basegun-ml
```

- **Research Folder**: This contains all the experimental work that led to the creation of features in Basegun.

Currently, Basegun has three main ML features:

1. **Gun Mechanism Classification**: This feature categorizes an image into a list of families representing different firearm mechanisms. The classification is based on descriptive, objective criteria that are independent of legal classification.

2. **Measure Length Module**: Measuring the overall length of a firearm or its barrel length is crucial for its legal classification. In France, the classification of long guns depends on these measurements. This module measures these lengths using an image.

3. **Alarm Gun Recognition**: An alarm gun is a type of blank gun recognized as an alarm by French legislation. These guns are considered impossible to modify to make them lethal. The associated algorithm detects alarm guns using markings on the weapon.

For more information, you can check our [Wiki](https://github.com/dnum-mi/basegun-ml/wiki)

It uses YOLO -> /!\ Licence
**Note**: Some models of Basegun-ml are based on YOLOv8 from [Ultralytics](https://github.com/ultralytics/ultralytics). To comply with the AGPL-3.0 license, Basegun-ml and all code using Basegun-ml must be under the same AGPL-3.0 license.
188 changes: 0 additions & 188 deletions legacy/classification/post_training.py

This file was deleted.

Loading

0 comments on commit 99cb5bd

Please sign in to comment.