Saravanan666/pypi-org huggingface dataset:
Package: autodistill-fastsam
Autodistill FastSAM ModuleThis repository contains the code supporting the FastSAM base model for use withAutodistill.FastSAMis a segmentation model trained on 2% of the SA-1B dataset used to train theSegment Anything Model.Read the fullAutodistill documentation.Read theFastSAM Autodistill documentation.InstallationTo use FastSAM with autodistill, you need to install the following dependency:pip3installautodistill-fastsamQuickstart[!NOTE]When you first run this model, the installation process will start. Inference may take a few seconds (in testing, up to 30 seconds) while the model is downloaded and installed. Once the model is installed, inference will be much faster.fromautodistill_fastsamimportFastSAM# define an ontology to map class names to our FastSAM prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=FastSAM(ontology=CaptionOntology({"person":"person","a forklift":"forklift"}))base_model.label("./context_images",extension=".jpeg")LicenseThis project is licensed under anApache 2.0 license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-fastvit
Autodistill FastViT ModuleThis repository contains the code supporting the FastViT base model for use withAutodistill.FastViT, developed by Apple, is a classification model that supports zero-shot classification.Read the fullAutodistill documentation.Read theFastViT Autodistill documentation.InstallationTo use FastViT with autodistill, you need to install the following dependency:pip3installautodistill-fastvitQuickstartFastViT works using the ImageNet-1k class list. This class list is available in theFASTVIT_IMAGENET_1K_CLASSESvariable.You can provide classes from the list to retrieve predictions for a specific class in the list. You can also provide a custom ontology to map classes from the list to your own classes.fromautodistill_fastvitimportFastViT,FASTVIT_IMAGENET_1K_CLASSESfromautodistill.detectionimportCaptionOntology# zero shot with no promptsbase_model=FastViT(None)# zero shot with prompts from FASTVIT_IMAGENET_1K_CLASSESbase_model=FastViT(ontology=CaptionOntology({"coffeemaker":"coffeemaker","ice cream":"ice cream"}))predictions=base_model.predict("./example.png")labels=[FASTVIT_IMAGENET_1K_CLASSES[i]foriinpredictions.class_id.tolist()]print(labels)LicenseSeeLICENSEfor the model license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-gcp-vision
Autodistill GCP Vision ModuleThis repository contains the code supporting theGoogle Cloud Object Localization APIbase model for use withAutodistill.With this repository, you can label images using the Google Cloud Object Localization API and train a fine-tuned model using the generated labels.This is ideal if you want to train a model that you own on a custom dataset.You can then use your trained model on your computer using Autodistill, or at the edge or in the cloud by deploying withRoboflow Inference.See our Autodistill modules forAWS RekognitionandAzure Custom Visionif you are interested in using those services instead.Read the fullAutodistill documentation.Read theGCP Vision Autodistill documentation.Installation[!NOTE]Using this project will incur billing charges for API calls to the Google Cloud Object Localization API. Refer to theGoogle Cloud Vision pricingfor more information. This package makes one API call per image you want to label.To use the Google Cloud Object Localization API with autodistill, you need to install the following dependency:pipinstallautodistill-gcp-visionYou will then need to authenticate with thegcloudCLI.Learnhow to install gcloud.Learnhow to set up and authenticate with gcloud.Quickstartfromautodistill_gcp_visionimportGCPVisionfromautodistill.detectionimportCaptionOntologyimportsupervisionassvimportcv2# define an ontology to map class names to our Google Cloud Object Localization API prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=GCPVision(ontology=CaptionOntology({"Person":"Person","a forklift":"forklift"}))detections=base_model.predict("image.jpeg")print(detections)# annotate predictions on an imageclasses=base_model.ontology.classes()box_annotator=sv.BoxAnnotator()labels=[f"{classes[class_id]}{confidence:0.2f}"for_,_,confidence,class_id,_indetections]image=cv2.imread("image.jpeg")annotated_frame=box_annotator.annotate(scene=image.copy(),detections=detections,labels=labels)sv.plot_image(image=annotated_frame,size=(16,16))LicenseThis project is licensed under anMIT license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-gemini
Autodistill Gemini ModuleThis repository contains the code supporting the Gemini base model for use withAutodistill.Gemini, developed by Google, is a multimodal computer vision model that allows you to ask questions about images. You can use Gemini with Autodistill for image classification.You can combine Gemini with other base models to label regions of an object. For example, you can use Grounding DINO to identify abstract objects (i.e. a vinyl record) then Gemini to classify the object (i.e. say which of five vinyl records the region represents). Read the AutodistillCombine Modelsguide for more information.[!NOTE]
Using this project will incur billing charges for API calls to the Gemini API.
Refer to theGoogle Cloud pricingpage for more information and to calculate your expected pricing. This package makes one API call per image you want to label.Read the fullAutodistill documentation.InstallationTo use Gemini with autodistill, you need to install the following dependency:pip3installautodistill-geminiQuickstartfromautodistill_geminiimportGemini# define an ontology to map class names to our Gemini prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=Gemini(ontology=CaptionOntology({"person":"person","a forklift":"forklift"}),gcp_region="us-central1",gcp_project="project-name",)# run inference on an imageresult=base_model.predict("image.jpg")print(result)# label a folder of imagesbase_model.label("./context_images",extension=".jpeg")LicenseThis project is licensed under anMIT license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-gpt-4v
Autodistill GPT-4V ModuleThis repository contains the code supporting the GPT-4V base model for use withAutodistill.GPT-4V, developed by OpenAI, is a multi-modal language model. With GPT-4V, you can ask questions about images in natural language. Theautodistill-gpt4vmodule enables you to classify images using GPT-4V.This model uses thegpt-4-vision-preview APIannounced by OpenAI on November 6th, 2023.[!NOTE]Using this project will incur billing charges for API calls to the OpenAI GPT-4 Vision API.
Refer to theOpenAI pricingpage for more information and to calculate your expected pricing. This package makes one API call per image you want to label.Read the fullAutodistill documentation.Read theGPT-4V Autodistill documentation.InstallationTo use GPT-4V with autodistill, you need to install the following dependency:pip3installautodistill-gpt-4vQuickstartfromautodistill_gpt_4vimportGPT4V# define an ontology to map class names to our GPT-4V prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=GPT4V(ontology=CaptionOntology({"person":"person","a forklift":"forklift"}))base_model.label("./context_images",extension=".jpeg")LicenseThis project is licensed under anMIT license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-grounded-edgesam
⚠️ This is an example README for use in creating a Base Model. You will need to adjust this document for the model you are using.Autodistill Grounded EdgeSAM ModuleThis repository contains the code supporting the Grounded EdgeSAM base model for use withAutodistill.EdgeSAM, introduced in the "EdgeSAM: Prompt-In-the-Loop Distillation for On-Device Deployment of SAM" paper, is a faster version of the Segment Anything model.Grounded EdgeSAM combinesGrounding DINOand EdgeSAM, allowing you to identify objects and generate segmentation masks for them.Read the fullAutodistill documentationto learn more about Autodistill.InstallationTo use Grounded EdgeSAM with autodistill, you need to install the following dependency:pip3installautodistill-grounded-edgesamQuickstartfromautodistill_clipimportCLIP# define an ontology to map class names to our GroundingDINO prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelfromautodistill_grounded_edgesamimportGroundedEdgeSAMfromautodistill.detectionimportCaptionOntologyfromautodistill.utilsimportplotimportcv2# define an ontology to map class names to our GroundedSAM prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=GroundedEdgeSAM(ontology=CaptionOntology({"person":"person","forklift":"forklift",}))# run inference on a single imageresults=base_model.predict("logistics.jpeg")plot(image=cv2.imread("logistics.jpeg"),classes=base_model.ontology.classes(),detections=results)# label a folder of imagesbase_model.label("./context_images",extension=".jpeg")LicenseThis repository is released under anS-Lab License 1.0license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-grounding-dino
Autodistill Grounding DINO ModuleThis repository contains the code supporting the Grounding DINO base model for use withAutodistill.Grounding DINOis a zero-shot object detection model developed by IDEA Research. You can distill knowledge from Grounding DINO into a smaller model using Autodistill.Read theGrounding DINO Autodistill documentation.InstallationTo use the Grounding DINO base model, you will need to install the following dependency:pip3installautodistill-grounding-dinoQuickstartfromautodistill_grounding_dinoimportGroundingDINOfromautodistill_yolov8importYOLOv8# define an ontology to map class names to our GroundingDINO prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=GroundingDINO(ontology=CaptionOntology({"shipping container":"container"}))# label all images in a folder called `context_images`base_model.label("./context_images",extension=".jpeg")LicenseThe code in this repository is licensed under anApache 2.0 license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-hls-geospatial
Autodistill HLS Geospatial ModuleThis repository contains the code supporting the HLS Geospatial base model for use withAutodistill.Harmonized Landsat and Sentinel-2 (HLS) Prithviis a collection of foundation models for geospatial analysis, developed by NASA and IBM. You can use Autodistill to automatically label images for use in training segmentation models.The following models are supported:Prithvi-100M-sen1floods11This module acceptstifffiles as input and returns segmentation masks.Read the fullAutodistill documentation.Read theHLS Geospatial Autodistill documentation.InstallationTo use HLS Geospatial with autodistill, you need to install the following dependency:pip3installautodistill-hls-geospatialQuickstartfromautodistill_hls_geospatialimportHLSGeospatialimportnumpyasnpimportrasteriofromskimageimportexposureimportsupervisionassvfromautodistill_hls_geospatialimportHLSGeospatialdefstretch_rgb(rgb):ls_pct=1pLow,pHigh=np.percentile(rgb[~np.isnan(rgb)],(ls_pct,100-ls_pct))img_rescale=exposure.rescale_intensity(rgb,in_range=(pLow,pHigh))returnimg_rescale#replace with the name of the file you want to labelFILE_NAME="USA_430764_S2Hand.tif"withrasterio.open(FILE_NAME)assrc:image=src.read()mask=imagergb=stretch_rgb((mask[[3,2,1],:,:].transpose((1,2,0))/10000*255).astype(np.uint8))base_model=HLSGeospatial()# replace with the file you want to usedetections=base_model.predict(FILE_NAME)mask_annotator=sv.MaskAnnotator()annotated_image=mask_annotator.annotate(scene=rgb,detections=detections)sv.plot_image(annotated_image,size=(10,10))# label a folder of .tif filesbase_model.label("./context_images",extension=".tif")LicenseThis project is licensed under anApache 2.0 license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-kosmos-2
Autodistill Kosmos-2 ModuleThis repository contains the code supporting the Kosmos-2 base model for use withAutodistill.Kosmos-2, developed by Microsoft, is a multimodal language model that you can use for zero-shot object detection. You can use Kosmos-2 with autodistill for object detection.Read the fullAutodistill documentation.Read theKosmos-2 Autodistill documentation.InstallationTo use Kosmos-2 with autodistill, you need to install the following dependency:pip3installautodistill-kosmos-2Quickstartfromautodistill_kosmos_2importKosmos2# define an ontology to map class names to our Kosmos2 prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=Kosmos2(ontology=CaptionOntology({"person":"person","a forklift":"forklift"}))predictions=base_model.predict("./example.png")base_model.label("./context_images",extension=".jpeg")LicenseThis package is implemented using theTransformers Kosmos-2 implementation. The underlying Kosmos-2 model, developed by Microsoft, is licensed under anMIT license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-llava
Autodistill LLaVA ModuleThis repository contains the code supporting the LLaVA base model for use withAutodistill.LLaVAis a multi-modal language model with object detection capabilities.  You can use LLaVA with autodistill for object detection.Learn more about LLaVA 1.5, the most recent version of LLaVA at the time of releasing this package.Read the fullAutodistill documentation.Read theLLaVA Autodistill documentation.InstallationTo use CLIP with autodistill, you need to install the following dependency:pip3installautodistill-clipQuickstartfromautodistill_llavaimportLLaVA# define an ontology to map class names to our LLaVA prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=LLaVA(ontology=CaptionOntology({"a forklift":"forklift"}))base_model.label("./context_images",extension=".jpeg")LicenseThis model is licensed under anApache 2.0 License.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-metaclip
Autodistill MetaCLIP ModuleThis repository contains the code supporting the MetaCLIP base model for use withAutodistill.MetaCLIP, developed by Meta AI Research, is a computer vision model trained using pairs of images and text. The model was described in theDemystifying CLIP Datapaper. You can use MetaCLIP with autodistill for image classification.Read the fullAutodistill documentation.Read theMetaCLIP Autodistill documentation.InstallationTo use MetaCLIP with autodistill, you need to install the following dependency:pip3installautodistill-metaclipQuickstartget predictionsfromautodistill_metaclipimportMetaCLIP# define an ontology to map class names to our MetaCLIP prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=MetaCLIP(ontology=CaptionOntology({"person":"person","a forklift":"forklift"}))results=base_model.predict("./image.png")print(results)calculate and compare embeddingsfromautodistill_metaclipimportMetaCLIPbase_model=MetaCLIP(None)text=base_model.embed_text("coffee")image=base_model.embed_image("coffeeshop.jpg")print(base_model.compare(text,image))LicenseThis project was licensed under a Creative CommonsAttribution-NonCommercial 4.0 International.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-open-flamingo
Autodistill autodistill-open-flamingoThe autodistill-open-flamingo package integrates with theAutodistill ecosystem, a framework for distilling large models into smaller, edge-ready models.If you are interested in implementing the autodistill-open-flamingo package for use with Autodistill, leave an issue on the mainAutodistill GitHub repositoryto discuss getting started.
Package: autodistill-owlv2
Autodistill OWLv2 ModuleThis repository contains the code supporting the OWLv2 base model for use withAutodistill.OWLv2 is a zero-shot object detection model that follows from on the OWL-ViT architecture. OWLv2 has an open vocabulary, which means you can provide arbitrary text prompts for the model. You can use OWLv2 with autodistill for object detection.Read the fullAutodistill documentation.Read theOWLv2 Autodistill documentation.InstallationTo use OWLv2 with autodistill, you need to install the following dependency:pip3installautodistill-owlv2Quickstartfromautodistill_owlv2importOWLv2fromautodistill.detectionimportCaptionOntology# define an ontology to map class names to our OWLv2 prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=OWLv2(ontology=CaptionOntology({"person":"person","a forklift":"forklift"}))# run inference on a single imageresults=base_model.predict("./context_images/image.png")base_model.label("./context_images",extension=".jpeg")LicenseThis model is licensed under anApache 2.0(see original model implementation license, and the correspondingHuggingFace Transformers documentation).🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-owl-vit
Autodistill OWL-ViT ModuleThis repository contains the code supporting the OWL-ViT base model for use withAutodistill.OWL-ViTis a transformer-based object detection model developed by Google Research.Read the fullAutodistill documentation.Read theOWL-ViT Autodistill documentation.InstallationTo use OWL-ViT with autodistill, you need to install the following dependency:pip3installautodistill-owl-vitQuickstartfromautodistill_owl_vitimportOWLViT# define an ontology to map class names to our OWLViT prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=OWLViT(ontology=CaptionOntology({"person":"person","a forklift":"forklift"}))base_model.label("./context_images",extension=".jpg")LicenseThe code in this repository is licensed under anApache 2.0 license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!
Package: autodistill-rekognition
Autodistill AWS Rekognition ModuleThis repository contains the code supporting theAWS Rekognition DetectLabelsbase model for use withAutodistill.With this repository, you can label images using the AWS Rekognition DetectLabels API and train a fine-tuned model using the generated labels.This is ideal if you want to train a model that you own on a custom dataset.You can then use your trained model on your computer using Autodistill, or at the edge or in the cloud by deploying withRoboflow Inference.See our Autodistill modules forGCP VisionandAzure Custom Visionif you are interested in using those services instead.Read the fullAutodistill documentation.Read theAutodistill AWS Rekognition documentation.Installation[!NOTE]Using this project will incur billing charges for API calls to the AWS Rekognition DetectLabels API. Refer to theAWS Rekognition pricingfor more information. This package makes one API call per image you want to label.To use the AWS Rekognition DetectLabels API with autodistill, you need to install the following dependency:pipinstallautodistill-rekognitionYou will then need to authenticate with theawsCLI.Learnhow to install theawsCLI.Learnhow to set up and authenticate with theawsCLI.QuickstartNote: You will need to installpython-opencvto run the example below.fromautodistill_rekognitionimportRekognitionfromautodistill.detectionimportCaptionOntologyimportsupervisionassvimportcv2# define an ontology to map class names to our Rekognition prompt# the ontology dictionary has the format {caption: class}# where caption is the prompt sent to the base model, and class is the label that will# be saved for that caption in the generated annotations# then, load the modelbase_model=Rekognition(ontology=CaptionOntology({"Person":"Person","a forklift":"forklift"}))results=base_model.predict("image.jpeg")# annotate predictions on an imageclasses=base_model.ontology.classes()box_annotator=sv.BoxAnnotator()labels=[f"{classes[class_id]}{confidence:0.2f}"for_,_,confidence,class_id,_indetections]image=cv2.imread("image.jpeg")annotated_frame=box_annotator.annotate(scene=image.copy(),detections=detections,labels=labels)sv.plot_image(image=annotated_frame,size=(16,16))LicenseThis project is licensed under anMIT license.🏆 ContributingWe love your input! Please see the core Autodistillcontributing guideto get started. Thank you 🙏 to all our contributors!