Files
mouse_control/pyproject.toml
Huang Qi de602365e9 Refactor into standard Python package with uv
- Move all code into src/mouse_control/ following the src-layout convention,
  with model/collect/train/visualize/inference as separate modules and
  SimpleNet extracted into model.py
- Add hatchling-based pyproject.toml with three CLI entry points
  (mouse-collect, mouse-train, mouse-visualize) and bundle the trained
  ONNX model as a package resource under assets/
- Move training data to data/, delete superseded show.py, remove dead
  imports (numpy, onnxruntime, onnx, onnxsim) and the unused
  visualize_path() helper
- Fix crashes in the collector: guard against destroyed-widget access
  after the n==100 destroy(), and skip save_to_csv when recording is
  off or the path is too short to derive 10 keypoints
- Switch ONNX export to external_data=False so the model ships as a
  single self-contained 19KB file
- Bytes-load the bundled model via importlib.resources so packaging
  remains correct under zip-safe distributions
- Rewrite README around the new layout, commands, and public API
2026-05-12 00:30:08 +08:00

45 lines
1.1 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "mouse-control"
version = "0.1.0"
description = "Neural-network mouse trajectory generation that mimics human motion."
readme = "README.md"
requires-python = ">=3.12"
keywords = ["mouse", "trajectory", "neural-network", "onnx", "anti-detection"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Operating System :: Microsoft :: Windows",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"matplotlib>=3.10",
"numpy>=2.0",
"onnxruntime>=1.20",
"onnxscript>=0.7",
"pandas>=2.0",
"scipy>=1.14",
"torch>=2.5",
]
[project.scripts]
mouse-collect = "mouse_control.collect:main"
mouse-train = "mouse_control.train:main"
mouse-visualize = "mouse_control.visualize:main"
[tool.hatch.build.targets.wheel]
packages = ["src/mouse_control"]
artifacts = ["src/mouse_control/assets/*.onnx"]
[tool.hatch.build.targets.sdist]
include = [
"src/",
"data/",
"imgs/",
"README.md",
"pyproject.toml",
]