Instructions to use heig-vd-geo/ImageVote_GridNet-HD_baseline with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use heig-vd-geo/ImageVote_GridNet-HD_baseline with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="heig-vd-geo/ImageVote_GridNet-HD_baseline")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("heig-vd-geo/ImageVote_GridNet-HD_baseline", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download utils/logging_utils.py from heig-vd-geo/ImageVote_GridNet-HD_baseline: direct link, hf CLI and curl.
- Browser
- Download file 340 Bytes
-
https://huggingface.co/heig-vd-geo/ImageVote_GridNet-HD_baseline/resolve/main/utils/logging_utils.py
- Command line
-
hf download hf://heig-vd-geo/ImageVote_GridNet-HD_baseline/utils/logging_utils.py
-
curl -L -o logging_utils.py https://huggingface.co/heig-vd-geo/ImageVote_GridNet-HD_baseline/resolve/main/utils/logging_utils.py
340 Bytes
| import logging | |
| from pathlib import Path | |
| def init_logging(log_file: Path): | |
| """ | |
| Initialize logging | |
| """ | |
| logging.basicConfig( | |
| level=logging.INFO, | |
| format="%(asctime)s [%(levelname)s] %(message)s", | |
| handlers=[ | |
| logging.FileHandler(log_file), | |
| logging.StreamHandler() | |
| ] | |
| ) | |