Metadata-Version: 2.4
Name: hed-tensor
Version: 1.0.1
Summary: Holistic Edge Detection (HED) model for TensorFlow/Keras with bundled pretrained weights
Home-page: https://github.com/yourusername/hed-model
Author: Mohammad Saad Nathani
Author-email: saadnathani2005@gmail.com
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: tensorflow>=2.4.0
Requires-Dist: numpy>=1.19.0
Requires-Dist: Pillow>=8.0.0
Requires-Dist: matplotlib>=3.3.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0.0; extra == "dev"
Requires-Dist: black>=21.0; extra == "dev"
Requires-Dist: flake8>=3.9.0; extra == "dev"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# HED-Tensor: Holistic Edge Detection

A TensorFlow/Keras implementation of **Holistically-Nested Edge Detection (HED)** with **pretrained weights included**. Use it as easily as VGG16 or ResNet!

## 🚀 Quick Start

### Installation

```bash
pip install hed-tensor
```

### Usage (3 lines!)

```python
from hed_tensor import HED, detect_edges

model = HED()  # Weights automatically load!
edges = detect_edges('your_image.jpg', model=model)
```

That's it! No need to download weights separately. 🎉

## 📦 Features

✅ **Pretrained weights included** - No extra downloads needed  
✅ **Simple API** - Just like using VGG16 or ResNet  
✅ **Multiple input formats** - Works with file paths, PIL Images, or NumPy arrays  
✅ **Batch processing** - Process multiple images efficiently  
✅ **TensorFlow 2.x** - Modern and fast  

## 🎯 Examples

### Basic Usage

```python
from hed_tensor import HED, detect_edges
from PIL import Image

# Load model (weights auto-load)
model = HED()

# Detect edges
edges = detect_edges('image.jpg', model=model)

# Save result
Image.fromarray(edges).save('edges.png')
```

### Using NumPy arrays

```python
import numpy as np
from hed_tensor import HED, detect_edges

model = HED()
image_array = np.array(Image.open('image.jpg'))
edges = detect_edges(image_array, model=model)
```

### Batch Processing

```python
from hed_tensor import batch_detect_edges, HED

model = HED()
image_paths = ['img1.jpg', 'img2.jpg', 'img3.jpg']

edge_maps = batch_detect_edges(
    image_paths, 
    model=model, 
    output_dir='output_edges'
)
```

### Load Custom Weights

```python
# Use your own trained weights
model = HED(weights='path/to/your/checkpoint.h5')

# Or skip loading weights
model = HED(weights=None)
```

## 📋 Requirements

- Python >= 3.7
- TensorFlow >= 2.4.0
- NumPy >= 1.19.0
- Pillow >= 8.0.0

## 🎓 Citation

If you use this package in your research, please cite the original HED paper:

```bibtex
@inproceedings{xie2015holistically,
  title={Holistically-nested edge detection},
  author={Xie, Saining and Tu, Zhuowen},
  booktitle={Proceedings of the IEEE International Conference on Computer Vision},
  pages={1395--1403},
  year={2015}
}
```

## 📄 License

MIT License

## 👨‍💻 Author

**Mohammad Saad Nathani**  
📧 saadnathani2005@gmail.com

## 🤝 Contributing

Contributions are welcome!

---

**Made with ❤️ for the Computer Vision community**
