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
File size: 405 Bytes
7b615ae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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}")
|