-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f50c9cb
Showing
11 changed files
with
926 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installed pip packages | ||
requirements/installed_packages.txt | ||
|
||
# Environments | ||
.env | ||
.venv | ||
.idea | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
.DS_Store | ||
|
||
# Neural Network weights ----------------------------------------------------------------------------------------------- |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include *.md *.in *.TXT LICENSE | ||
exclude *.cmd | ||
recursive-include vsensebox * | ||
recursive-exclude __pycache__ * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 📥 `vsensebox-data` | ||
|
||
* `vsensebox-data` can dynamically create individual data packages of the supported modules for [`VSenseBox`](https://github.com/rathaumons/vsensebox). | ||
|
||
* `vsensebox-data` relies on the configurations inside [`setupconfig`](setupconfig) in order to create individual Python wheels. | ||
|
||
* Only a few pretrained weight/model files are included in the prebuilt `.whl` [files on GitHub releases](https://github.com/rathaumons/vsensebox-data/releases). | ||
|
||
* The pretrained weight/model files are not included in the repo as they are too big (Over 1GB). | ||
|
||
## Installation | ||
|
||
* `YOLO_Classic` | [License/Repo](https://github.com/AlexeyAB/darknet) | ||
``` | ||
pip install https://github.com/rathaumons/vsensebox-data/releases/download/v0.0.0/vsensebox_data_yolocls-0.0.0-py3-none-any.whl | ||
``` | ||
* `YOLO_Ultralytics` | [License/Repo](https://github.com/ultralytics) | ||
``` | ||
pip install https://github.com/rathaumons/vsensebox-data/releases/download/v0.0.0/vsensebox_data_yoloult-0.0.0-py3-none-any.whl | ||
``` | ||
* `DeepSORT` | [License/Repo](https://github.com/deshwalmahesh/yolov7-deepsort-tracking) | ||
``` | ||
pip install https://github.com/rathaumons/vsensebox-data/releases/download/v0.0.0/vsensebox_data_deepsort-0.0.0-py3-none-any.whl | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
:: VSenseBox - Python toolbox for visual sensing | ||
:: GNU General Public License v3 or later (GPLv3+) | ||
:: Copyright (C) 2024 UMONS-Numediart | ||
|
||
@echo off | ||
setlocal | ||
cd /d %~dp0 | ||
set "PYTHONWARNINGS=ignore" | ||
python -m pip install --upgrade pip | ||
pip install wheel build PyYAML | ||
python -m build --wheel --skip-dependency-check --no-isolation | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# VSenseBox - Python toolbox for visual sensing | ||
# GNU General Public License v3 or later (GPLv3+) | ||
# Copyright (C) 2024 UMONS-Numediart | ||
|
||
|
||
from setuptools import setup | ||
from setupconfig.datamng import DataManager | ||
|
||
|
||
def main(): | ||
|
||
long_description = open("README.md", encoding="utf-8").read() | ||
|
||
dm = DataManager() | ||
pkg_name, version, packages, package_data = dm.get_selected_data() | ||
|
||
setup( | ||
name=pkg_name, | ||
version=version, | ||
url="https://github.com/rathaumons/vsensebox-data", | ||
license="GPL-3.0-or-later", | ||
description="Dynamic data packager for the supported detector/tracker of VSenseBox.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
packages=packages, | ||
package_data=package_data, | ||
include_package_data=True, | ||
author="Ratha SIV", | ||
maintainer="rathaROG", | ||
install_requires=None, | ||
python_requires=">=3.9", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Education", | ||
"Intended Audience :: Information Technology", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Image Recognition", | ||
"Topic :: Software Development", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX", | ||
"Operating System :: Unix", | ||
"Operating System :: MacOS", | ||
], | ||
) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- # YOLO_Classic | ||
name: YOLO_Classic | ||
version: 0.0.0 | ||
pkg_suffix: yolocls | ||
data_paths: | ||
- vsensebox.data.detectors | ||
# | ||
--- # YOLO_Ultralytics | ||
name: YOLO_Ultralytics | ||
version: 0.0.0 | ||
pkg_suffix: yoloult | ||
data_paths: | ||
- vsensebox.data.detectors | ||
# | ||
--- # DeepSORT | ||
name: DeepSORT | ||
version: 0.0.0 | ||
pkg_suffix: deepsort | ||
data_paths: | ||
- vsensebox.data.trackers | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# VSenseBox - Python toolbox for visual sensing | ||
# GNU General Public License v3 or later (GPLv3+) | ||
# Copyright (C) 2024 UMONS-Numediart | ||
|
||
|
||
import os | ||
import yaml | ||
from yaml.loader import SafeLoader | ||
|
||
this_dir = os.path.dirname(__file__).replace(os.sep, '/') | ||
data_yaml = os.path.join(this_dir, "data.yaml") | ||
selector_yaml = os.path.join(this_dir, "selector.yaml") | ||
|
||
class DataManager(object): | ||
|
||
def __init__(self, data_yaml=data_yaml): | ||
"""Read and load data from :obj:`data_yaml`. | ||
Parameters | ||
---------- | ||
data_yaml : str | ||
A YAML file of data.yaml. | ||
""" | ||
with open(data_yaml) as data: | ||
self.raw_data = yaml.load_all(data, Loader=SafeLoader) | ||
self.data_list = [] | ||
for raw_d in list(self.raw_data): | ||
self.data_list.append(raw_d) | ||
|
||
def get_selected_data(self, selector_yaml=selector_yaml): | ||
"""Get the selected data. | ||
Parameters | ||
---------- | ||
selector_yaml : str | ||
A YAML file of selector.yaml. | ||
Returns | ||
------- | ||
str | ||
Package name, parameter :obj:`name` for :func:`setup()`. | ||
str | ||
Version string of the data/package, | ||
parameter :obj:`version` for :func:`setup()`. | ||
list | ||
List of the included directy of the data/package, | ||
parameter :obj:`packages` for :func:`setup()`. | ||
dict | ||
Dictionary of the included file of the data/package, | ||
parameter :obj:`package_data` for :func:`setup()`. | ||
""" | ||
|
||
pkg_name = "vsensebox-data-" | ||
version = "" | ||
packages = [] | ||
package_data = {} | ||
|
||
with open(selector_yaml) as selector: | ||
self.selector_dict = yaml.load(selector, Loader=SafeLoader) | ||
|
||
for d in self.data_list: | ||
if d['name'].lower() == self.selector_dict['name'].lower(): | ||
pkg_name += d['pkg_suffix'] | ||
version = str(d['version']) | ||
packages = d['data_paths'] | ||
for p in packages: | ||
package_data.update({p: ["*"]}) | ||
break | ||
|
||
return pkg_name, version, packages, package_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- # Select a module by a module name | ||
name: YOLO_Classic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore |