Instructions to use fahimahamed1/NeoNude with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fahimahamed1/NeoNude with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("fahimahamed1/NeoNude", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download src/transforms/annotation.py from fahimahamed1/NeoNude: direct link, hf CLI and curl.
- Browser
- Download file 508 Bytes
-
https://huggingface.co/fahimahamed1/NeoNude/resolve/main/src/transforms/annotation.py
- Command line
-
hf download hf://fahimahamed1/NeoNude/src/transforms/annotation.py
-
curl -L -o annotation.py https://huggingface.co/fahimahamed1/NeoNude/resolve/main/src/transforms/annotation.py
508 Bytes
| """ | |
| Body part annotation data class used by the mask finalization step. | |
| """ | |
| class BodyPart: | |
| """Represents a detected body part with bounding box, center, and dimensions.""" | |
| def __init__(self, name, xmin, ymin, xmax, ymax, x, y, w, h): | |
| self.name = name | |
| # Bounding box | |
| self.xmin = xmin | |
| self.ymin = ymin | |
| self.xmax = xmax | |
| self.ymax = ymax | |
| # Center | |
| self.x = x | |
| self.y = y | |
| # Dimensions | |
| self.w = w | |
| self.h = h | |