autodistill-remote-clip


Nameautodistill-remote-clip JSON
Version 0.1.2 PyPI version JSON
download
home_page
SummaryRemote CLIP model for use with Autodistill
upload_time2023-12-05 09:20:30
maintainer
docs_urlNone
authorRoboflow
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <p>
    <a align="center" href="" target="_blank">
      <img
        width="850"
        src="https://media.roboflow.com/open-source/autodistill/autodistill-banner.png"
      >
    </a>
  </p>
</div>

# Autodistill RemoteCLIP Module

This repository contains the code supporting the RemoteCLIP base model for use with [Autodistill](https://github.com/autodistill/autodistill).

[RemoteCLIP](https://github.com/ChenDelong1999/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](https://autodistill.github.io/autodistill/).

Read the [RemoteCLIP Autodistill documentation](https://autodistill.github.io/autodistill/base_models/remoteclip/).

## Installation

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

```bash
pip3 install autodistill-remote-clip
```

## Quickstart

```python
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](https://github.com/ChenDelong1999/RemoteCLIP) for the most up-to-date licensing information regarding the model.

## 🏆 Contributing

We love your input! Please see the core Autodistill [contributing guide](https://github.com/autodistill/autodistill/blob/main/CONTRIBUTING.md) to get started. Thank you 🙏 to all our contributors!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "autodistill-remote-clip",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Roboflow",
    "author_email": "support@roboflow.com",
    "download_url": "https://files.pythonhosted.org/packages/80/86/890fbd474c320657936d9d05783fefff653fa54b490f2e546dab23788359/autodistill-remote-clip-0.1.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <p>\n    <a align=\"center\" href=\"\" target=\"_blank\">\n      <img\n        width=\"850\"\n        src=\"https://media.roboflow.com/open-source/autodistill/autodistill-banner.png\"\n      >\n    </a>\n  </p>\n</div>\n\n# Autodistill RemoteCLIP Module\n\nThis repository contains the code supporting the RemoteCLIP base model for use with [Autodistill](https://github.com/autodistill/autodistill).\n\n[RemoteCLIP](https://github.com/ChenDelong1999/RemoteCLIP) is a vision-language CLIP model trained on remote sensing data. According to the RemoteCLIP README:\n\n> 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.\n\nRead the full [Autodistill documentation](https://autodistill.github.io/autodistill/).\n\nRead the [RemoteCLIP Autodistill documentation](https://autodistill.github.io/autodistill/base_models/remoteclip/).\n\n## Installation\n\nTo use RemoteCLIP with autodistill, you need to install the following dependency:\n\n```bash\npip3 install autodistill-remote-clip\n```\n\n## Quickstart\n\n```python\nfrom autodistill_remote_clip import RemoteCLIP\nfrom autodistill.detection import CaptionOntology\n\n# define an ontology to map class names to our RemoteCLIP prompt\n# the ontology dictionary has the format {caption: class}\n# where caption is the prompt sent to the base model, and class is the label that will\n# be saved for that caption in the generated annotations\n# then, load the model\nbase_model = RemoteCLIP(\n    ontology=CaptionOntology(\n        {\n            \"airport runway\": \"runway\",\n            \"countryside\": \"countryside\",\n        }\n    )\n)\n\npredictions = base_model.predict(\"runway.jpg\")\n\nprint(predictions)\n```\n\n## License\n\nThis 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](https://github.com/ChenDelong1999/RemoteCLIP) for the most up-to-date licensing information regarding the model.\n\n## \ud83c\udfc6 Contributing\n\nWe love your input! Please see the core Autodistill [contributing guide](https://github.com/autodistill/autodistill/blob/main/CONTRIBUTING.md) to get started. Thank you \ud83d\ude4f to all our contributors!\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Remote CLIP model for use with Autodistill",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ae1f74804c290e02e6bab4ad2a12e8ce084d1614a09baabc467284b2c25dbf4",
                "md5": "35ecf7f1c2eb68321bd5c3305d3d5880",
                "sha256": "d23fddb063a513df0261bb039c60508f3441748b35ebf74e5434efa758adb840"
            },
            "downloads": -1,
            "filename": "autodistill_remote_clip-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "35ecf7f1c2eb68321bd5c3305d3d5880",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4585,
            "upload_time": "2023-12-05T09:20:28",
            "upload_time_iso_8601": "2023-12-05T09:20:28.329751Z",
            "url": "https://files.pythonhosted.org/packages/4a/e1/f74804c290e02e6bab4ad2a12e8ce084d1614a09baabc467284b2c25dbf4/autodistill_remote_clip-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8086890fbd474c320657936d9d05783fefff653fa54b490f2e546dab23788359",
                "md5": "14669b6260ade1fe0845da9d2275f04d",
                "sha256": "6912eeaedf1dc7a36558894c2fff68fcd84c98198933abc13695830386d8ec15"
            },
            "downloads": -1,
            "filename": "autodistill-remote-clip-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "14669b6260ade1fe0845da9d2275f04d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4231,
            "upload_time": "2023-12-05T09:20:30",
            "upload_time_iso_8601": "2023-12-05T09:20:30.078310Z",
            "url": "https://files.pythonhosted.org/packages/80/86/890fbd474c320657936d9d05783fefff653fa54b490f2e546dab23788359/autodistill-remote-clip-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-05 09:20:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "autodistill-remote-clip"
}
        
Elapsed time: 0.16211s