A package for image-based question answering using Moondream
Project description
🌔 moondream
a tiny vision language model that kicks ass and runs anywhere
Website | Hugging Face | Demo
Examples
| Image | Example |
|---|---|
| What is the girl doing? The girl is sitting at a table and eating a large hamburger. What color is the girl's hair? The girl's hair is white. |
|
| What is this? This is a computer server rack, which is a device used to store and manage multiple computer servers. The rack is filled with various computer servers, each with their own dedicated space and power supply. The servers are connected to the rack via multiple cables, indicating that they are part of a larger system. The rack is placed on a carpeted floor, and there is a couch nearby, suggesting that the setup is in a living or entertainment area. What is behind the stand? Behind the stand, there is a brick wall. |
Features
- Easy-to-use command line interface
- Python API for integration into your projects
- Support for various image formats
- Efficient processing using PyTorch
- GPU acceleration support
Installation
pip install moondream
Quick Start
Command Line Interface
moondream -i path/to/image.jpg -p "What's in this image?" -m path/to/model.safetensors
Python API
from moondream import run_inference
result = run_inference(
image_path="path/to/image.jpg",
prompt="What's in this image?",
model_path="path/to/model.safetensors"
)
print(result)
Model Weights
You'll need to download the model weights separately. You can find them at 🤗HuggingFace/vikhyatk/moondream2.
Requirements
- Python 3.8+
- PyTorch
- transformers
- Pillow
License
MIT License
Author
vikhyat (vik@m87.ai) 1997marsrover (antonygithinji11156@gmail.com)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moondream-1.0.3.tar.gz.
File metadata
- Download URL: moondream-1.0.3.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d666b3959317ae72f09e19560b5b23d9d5ada1bea178bcd5c6f3444ecdf9736c
|
|
| MD5 |
817f88199fd4752c2d8a66403b330884
|
|
| BLAKE2b-256 |
22485527f114134b673d271da9cf320b971e48d6113560c1d5c1b0ab5ba34969
|
File details
Details for the file moondream-1.0.3-py3-none-any.whl.
File metadata
- Download URL: moondream-1.0.3-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21ef1238b09a3512ace9e65681b6feb44bda0053d25b5c5730c2d46e87d269d1
|
|
| MD5 |
5736d6f4aa41d5b54a97147ad486d4bc
|
|
| BLAKE2b-256 |
c61585d659e1a94fa740e3e61c14ab5781f7e4a807ba5119531ee6f7744899ec
|