Skip to main content

Remote CLIP model for use with Autodistill

Project description

Autodistill RemoteCLIP Module

This repository contains the code supporting the RemoteCLIP base model for use with Autodistill.

RemoteCLIP is a vision-language CLIP model trained on remote sensing data. According to the RemoteCLIP README:

RemoteCLIP outperforms previous SoTA by 9.14% mean recall on the RSICD dataset and by 8.92% on RSICD dataset. For zero-shot classification, our RemoteCLIP outperforms the CLIP baseline by up to 6.39% average accuracy on 12 downstream datasets.

Read the full Autodistill documentation.

Read the RemoteCLIP Autodistill documentation.

Installation

To use RemoteCLIP with autodistill, you need to install the following dependency:

pip3 install autodistill-remote-clip

Quickstart

from autodistill_remote_clip import RemoteCLIP
from autodistill.detection import CaptionOntology

# define an ontology to map class names to our RemoteCLIP 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 model
base_model = RemoteCLIP(
    ontology=CaptionOntology(
        {
            "airport runway": "runway",
            "countryside": "countryside",
        }
    )
)

predictions = base_model.predict("runway.jpg")

print(predictions)

License

This Autodistill module is licensed under an MIT license. At the time of publishing this project, the RemoteCLIP model and weights had no attached license. Refer to the RemoteCLIP repository for the most up-to-date licensing information regarding the model.

🏆 Contributing

We love your input! Please see the core Autodistill contributing guide to get started. Thank you 🙏 to all our contributors!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autodistill-remote-clip-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

autodistill_remote_clip-0.1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file autodistill-remote-clip-0.1.2.tar.gz.

File metadata

File hashes

Hashes for autodistill-remote-clip-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6912eeaedf1dc7a36558894c2fff68fcd84c98198933abc13695830386d8ec15
MD5 14669b6260ade1fe0845da9d2275f04d
BLAKE2b-256 8086890fbd474c320657936d9d05783fefff653fa54b490f2e546dab23788359

See more details on using hashes here.

File details

Details for the file autodistill_remote_clip-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for autodistill_remote_clip-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d23fddb063a513df0261bb039c60508f3441748b35ebf74e5434efa758adb840
MD5 35ecf7f1c2eb68321bd5c3305d3d5880
BLAKE2b-256 4ae1f74804c290e02e6bab4ad2a12e8ce084d1614a09baabc467284b2c25dbf4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page