Metadata-Version: 2.1
Name: SafeScanEngine
Version: 0.2.0
Summary: A package to identify dangerous non baby-proof items.
Author-email: Dragos Josan <dragosjosan@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Dragos Josan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: YOLO
Requires-Dist: pytest
Requires-Dist: ultralytics
Requires-Dist: Pillow
Requires-Dist: pillow_heif

# SafeScanEngine
## Overview
SafeScanEngine is a Python Library designed for identifying dangerous (non baby-proof) from a list of images. 
The engine was design to be an interface for more than one image processing solvers. 
For the time being, YoloV8 was implemented

## Key Features
- Can identify both lethal and non-lethal objects.

### Lethal:
- Electrical outlets
- Plastic bags (to be implemented)
- Cables/cords of any kind (to be implemented)

### Non-lethal:
- Sharp corners (to be implemented)

## Requirements
- Python 3.7 or higher
- Pillow

## Installation
To install, run: 
```shell
pip install SafeScanEngine
```

## Usage
```shell
from safe_scan_engine import YoloV8Resolver

model = YoloV8Resolver(images=["img_1.jpg", "img_no_danger.jpg", "img_2.jpg"])
results = model.return_detections()

# Process results list
for result in results:
    boxes = result["boxes"]  # Boxes as list for bbox outputs in json serializable form
    original_shape = result["original_shape"]  # Input image dimensions
    labels = result["names"]  # Labels detected (e.g. ElectricalOutlet) 
    result_image_with_label = result["encoded_image"]  # Result image (with boxes) encoded in base64
    was_danger_detected = result["danger_found"]  # Boolean always available even if nothing was detected (e.g. False)
```

## License
MIT License. See LICENSE for details.

## Contact
Reach out at dragosjosan@gmail.com for support or inquiries.
