Metadata-Version: 2.4
Name: arv-hsv-tuner
Version: 0.1.2
Summary: UM-ARV HSV color space tuning tool for lane detection with YOLO integration
Author-email: Steffano Martinez <steffano.martinez@umich.edu>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/arv-hsv-tuner
Project-URL: Documentation, https://github.com/yourusername/arv-hsv-tuner#readme
Project-URL: Repository, https://github.com/yourusername/arv-hsv-tuner
Project-URL: Issues, https://github.com/yourusername/arv-hsv-tuner/issues
Keywords: hsv,opencv,lane-detection,yolo,computer-vision,autonomous-vehicles
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: opencv-python>=4.5.0
Requires-Dist: numpy>=1.19.0
Requires-Dist: ultralytics>=8.0.0
Requires-Dist: PySide6>=6.10.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Dynamic: license-file

# ARV HSV Tuner

### by Matthew Gawthrop

## Algorithm description
Utilizes hsv filtering and YOLO ML models to gain a consistent occupancy grid of mainly lane line, potholes, and traffic barrels. 

`hsv.py` is designed to be used as a library, meaning the file is meant to be copied into other projects and then imported into a file for use `from hsv import hsv`. Each object of the hsv class is tied to a video path. This video path is not only used for saving of hsv filtering values but also is directly used for streaming video during tuning.

### Tuning
Reference `demo.py` for a look at the functionality with tuning. 

You must first create an object with the video path that you want to tune for (`examples/hsv_data_template.json`). Then by calling `hsv_obj.tune(mask_name)` you can slide the sliders back and forth until you reach the mask you want. Finally, slide the "Done Tuning" slider and the values will be saved in `<your_defined_hsv_name>.json`. You can do this over and over with new mask_names to get a whole suite of masks that are connected to one video path. Change the video path on construction of the object and you can create a new set of masks for that video too.

Once you have completed all your tuning, use `get_mask(frame)` to get the individual and combined masks you tuned for.

### Getting Occ Grids
Use `combined, mask_dictionary = get_mask(frame)` which will return a 2D numpy array of all combined masks that have been tuned for this object. It also returns a dictionary which maps from mask_name -> occ grid which can be used to get just one colors occupancy grid at a time. 
