Instructions to use thegoatcc/classpulse-edge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use thegoatcc/classpulse-edge with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("thegoatcc/classpulse-edge", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Download enroll.py from thegoatcc/classpulse-edge: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/thegoatcc/classpulse-edge/resolve/main/enroll.py
- Command line
-
hf download hf://thegoatcc/classpulse-edge/enroll.py
-
curl -L -o enroll.py https://huggingface.co/thegoatcc/classpulse-edge/resolve/main/enroll.py
1.01 kB
| from __future__ import annotations | |
| import argparse | |
| from core.config_manager import ConfigManager | |
| from core.enrollment_service import EnrollmentService | |
| from storage.database import DatabaseRepository | |
| def main() -> None: | |
| parser = argparse.ArgumentParser(description="Enroll student face profiles into ClassPulse Edge SQLite DB.") | |
| parser.add_argument("--backend", default="mock", choices=["mock", "insightface", "hailo"]) | |
| parser.add_argument("--course", default=None, help="Optional course_code to enroll all students into") | |
| args = parser.parse_args() | |
| cfg = ConfigManager("config.yaml") | |
| db = DatabaseRepository(cfg.get_path("database")) | |
| svc = EnrollmentService(db=db, enrollment_dir=cfg.get_path("enrollment_dir"), backend=args.backend) | |
| stats = svc.enroll_from_directory(default_course_code=args.course) | |
| print(f"Enrollment complete: {stats['students']} student(s), {stats['profiles']} face profile(s) saved.") | |
| if __name__ == "__main__": | |
| main() | |