Instructions to use AndreCosta/resnet-unet-segmentation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AndreCosta/resnet-unet-segmentation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="AndreCosta/resnet-unet-segmentation")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AndreCosta/resnet-unet-segmentation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download scripts/Dataset/getImages.py from AndreCosta/resnet-unet-segmentation: direct link, hf CLI and curl.
- Browser
- Download file 405 Bytes
-
https://huggingface.co/AndreCosta/resnet-unet-segmentation/resolve/main/scripts/Dataset/getImages.py
- Command line
-
hf download hf://AndreCosta/resnet-unet-segmentation/scripts/Dataset/getImages.py
-
curl -L -o getImages.py https://huggingface.co/AndreCosta/resnet-unet-segmentation/resolve/main/scripts/Dataset/getImages.py
405 Bytes
| import os | |
| import scripts.config as config | |
| from simple_image_download import simple_image_download as simp | |
| termo_busca = "garrote" | |
| pasta_destino = config.tempImages | |
| quantidade = 200 | |
| if not os.path.exists(pasta_destino): | |
| os.makedirs(pasta_destino) | |
| response = simp.simple_image_download | |
| response().download(termo_busca, quantidade) | |
| print(f"Download complete! Images saved to: {pasta_destino}") | |