supertracker


Namesupertracker JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryAn easy-to-use library for implementing various multi-object tracking algorithms.
upload_time2025-02-09 09:02:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License
keywords supertracker
VCS
bugtrack_url
requirements numpy pytest pytest-cov pytest-xdist scipy
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # supertracker

[![image](https://img.shields.io/pypi/v/supertracker.svg)](https://pypi.python.org/pypi/supertracker)

**An easy-to-use library for implementing various multi-object tracking algorithms.**

## Features

- Simple and intuitive interface for multi-object tracking
- Multiple tracking algorithms supported:
  - ByteTrack
  - DeepSORT (coming soon)
  - SORT (coming soon)
  - OCSORT (coming soon)
  - BoT-SORT (coming soon)
- Support for custom detection formats
- Easy integration with existing detection pipelines
- Modular design for adding new trackers

## Documentation
Visit our [documentation](https://Hirai-Labs.github.io/supertracker) to find:
- Detailed API reference
- Configuration guides for each tracker
- Performance benchmarks
- Integration examples with popular detection models
- Advanced usage tutorials
- Troubleshooting guide

## Installation

```bash
pip install supertracker
```

## Examples

```python
import cv2
from ultralytics import YOLO
from supertracker import ByteTrack
from supertracker import Detections

# Initialize YOLO model and tracker
model = YOLO('yolov8n.pt')  # or your custom model
tracker = ByteTrack(
    track_activation_threshold=0.25,
    lost_track_buffer=30,
    frame_rate=30
)

# Initialize video capture
cap = cv2.VideoCapture(0)  # or video file path

while True:
    ret, frame = cap.read()
    if not ret:
        break

    # Run YOLO detection
    results = model(frame)[0]
    
    # Convert YOLO results to Detections format
    detections = Detections(
        xyxy=results.boxes.xyxy.cpu().numpy(),
        confidence=results.boxes.conf.cpu().numpy(),
        class_id=results.boxes.cls.cpu().numpy().astype(int)
    )
    
    # Update tracker
    tracked_objects = tracker.update_with_detections(detections)

    # Visualize results
    for i in range(len(tracked_objects)):
        box = tracked_objects.xyxy[i].astype(int)
        track_id = tracked_objects.tracker_id[i]
        class_id = tracked_objects.class_id[i]
        conf = tracked_objects.confidence[i]
        
        # Draw bounding box
        cv2.rectangle(frame, (box[0], box[1]), (box[2], box[3]), (0, 255, 0), 2)
        
        # Draw label with class name, track ID and confidence
        label = f"#{track_id} {model.names[class_id]} {conf:.2f}"
        cv2.putText(frame, label, (box[0], box[1] - 10),
                   cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)

    cv2.imshow("Tracking", frame)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()
```

## Contributing

Contributions are welcome! Here's how you can help:

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "supertracker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "supertracker",
    "author": null,
    "author_email": "Syahvan Alviansyah <syahvanalviansyah91@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/76/75/d1f18bb07575d66520b5406742b75fc7b448e177832505e08867b84aadec/supertracker-0.0.3.tar.gz",
    "platform": null,
    "description": "# supertracker\n\n[![image](https://img.shields.io/pypi/v/supertracker.svg)](https://pypi.python.org/pypi/supertracker)\n\n**An easy-to-use library for implementing various multi-object tracking algorithms.**\n\n## Features\n\n- Simple and intuitive interface for multi-object tracking\n- Multiple tracking algorithms supported:\n  - ByteTrack\n  - DeepSORT (coming soon)\n  - SORT (coming soon)\n  - OCSORT (coming soon)\n  - BoT-SORT (coming soon)\n- Support for custom detection formats\n- Easy integration with existing detection pipelines\n- Modular design for adding new trackers\n\n## Documentation\nVisit our [documentation](https://Hirai-Labs.github.io/supertracker) to find:\n- Detailed API reference\n- Configuration guides for each tracker\n- Performance benchmarks\n- Integration examples with popular detection models\n- Advanced usage tutorials\n- Troubleshooting guide\n\n## Installation\n\n```bash\npip install supertracker\n```\n\n## Examples\n\n```python\nimport cv2\nfrom ultralytics import YOLO\nfrom supertracker import ByteTrack\nfrom supertracker import Detections\n\n# Initialize YOLO model and tracker\nmodel = YOLO('yolov8n.pt')  # or your custom model\ntracker = ByteTrack(\n    track_activation_threshold=0.25,\n    lost_track_buffer=30,\n    frame_rate=30\n)\n\n# Initialize video capture\ncap = cv2.VideoCapture(0)  # or video file path\n\nwhile True:\n    ret, frame = cap.read()\n    if not ret:\n        break\n\n    # Run YOLO detection\n    results = model(frame)[0]\n    \n    # Convert YOLO results to Detections format\n    detections = Detections(\n        xyxy=results.boxes.xyxy.cpu().numpy(),\n        confidence=results.boxes.conf.cpu().numpy(),\n        class_id=results.boxes.cls.cpu().numpy().astype(int)\n    )\n    \n    # Update tracker\n    tracked_objects = tracker.update_with_detections(detections)\n\n    # Visualize results\n    for i in range(len(tracked_objects)):\n        box = tracked_objects.xyxy[i].astype(int)\n        track_id = tracked_objects.tracker_id[i]\n        class_id = tracked_objects.class_id[i]\n        conf = tracked_objects.confidence[i]\n        \n        # Draw bounding box\n        cv2.rectangle(frame, (box[0], box[1]), (box[2], box[3]), (0, 255, 0), 2)\n        \n        # Draw label with class name, track ID and confidence\n        label = f\"#{track_id} {model.names[class_id]} {conf:.2f}\"\n        cv2.putText(frame, label, (box[0], box[1] - 10),\n                   cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)\n\n    cv2.imshow(\"Tracking\", frame)\n    if cv2.waitKey(1) & 0xFF == ord('q'):\n        break\n\ncap.release()\ncv2.destroyAllWindows()\n```\n\n## Contributing\n\nContributions are welcome! Here's how you can help:\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "An easy-to-use library for implementing various multi-object tracking algorithms.",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/Hirai-Labs/supertracker"
    },
    "split_keywords": [
        "supertracker"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1140bcdb96afff5d1fd5d86ba605ff6aa6197e4d462dfd5d4c5ea977a63ac466",
                "md5": "7769b53b691b36d7e2035e971743521b",
                "sha256": "40575c3b42ec60aa4cd5600ec484edac6b63de499cdf279c0673b42e61f62873"
            },
            "downloads": -1,
            "filename": "supertracker-0.0.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7769b53b691b36d7e2035e971743521b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 14189,
            "upload_time": "2025-02-09T09:02:48",
            "upload_time_iso_8601": "2025-02-09T09:02:48.002183Z",
            "url": "https://files.pythonhosted.org/packages/11/40/bcdb96afff5d1fd5d86ba605ff6aa6197e4d462dfd5d4c5ea977a63ac466/supertracker-0.0.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7675d1f18bb07575d66520b5406742b75fc7b448e177832505e08867b84aadec",
                "md5": "e96819fc87bd7a2c978f0780ca5a0454",
                "sha256": "6bc1a98cba6de8bbdedec2fbbe29bf0f335f135e7de1234ab897680292a86788"
            },
            "downloads": -1,
            "filename": "supertracker-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e96819fc87bd7a2c978f0780ca5a0454",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7693251,
            "upload_time": "2025-02-09T09:02:50",
            "upload_time_iso_8601": "2025-02-09T09:02:50.468592Z",
            "url": "https://files.pythonhosted.org/packages/76/75/d1f18bb07575d66520b5406742b75fc7b448e177832505e08867b84aadec/supertracker-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-09 09:02:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Hirai-Labs",
    "github_project": "supertracker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.20.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7.4.3"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    ">=",
                    "4.1.0"
                ]
            ]
        },
        {
            "name": "pytest-xdist",
            "specs": [
                [
                    ">=",
                    "3.3.1"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.7.0"
                ]
            ]
        }
    ],
    "lcname": "supertracker"
}
        
Elapsed time: 0.74072s