Skip to main content

vlm_inference

This repository contains code for performing inference using a Vision-Language Model (VLM) for robotic navigation tasks.

Setup Instructions

Follow these steps to use the library, it is already available by PyP:

  1. Intall library:

Here you have two options, install twrought the PyP:

    pip install openai==1.78.1 opencv-python==4.11.0.86 pyyaml dotenv==0.9.9 pillow==9.0.1
    pip install vlm_inference

You can try the library in action using this Colab notebook:
📎 Open In Colab

Install since the repostitory:

    git clone ssh://git@gitlab.iri.upc.edu:2202/mobile_robotics/moonshot_project/vlm/vlm_inference.git

    cd vlm_inference
    python3 pip install -r requirements.txt

Install by the repository

    pip install -e .
  1. Create a .env file and add your OpenAI API key and the VLM configuration path:

    Create a file named .env in the root directory of the repository and add the following content, replacing sk-proj-_HFJE2I64........... with your actual OpenAI API key and ensuring the VLM_CONFIG_PATH points to your configuration file:

    # .env
    OPENAI_API_KEY=sk-proj-_HFJE2I64...........
    VLM_CONFIG_PATH=vlm_inference/config.yaml

If you have can´t not modify the python version use the following command:

    python3 pip install -r requirements.txt
  1. Set the navigation goal (optional):

    If you want to specify a navigation goal as an object or person with a description, open the following file:

    vlm_navigation/prompt_manager/navigation_prompt.txt
Locate line 7, which defines the `navigation_goal` variable, and modify it according to your desired goal. For example:
    navigation_goal = "a red chair near the window"
  1. Run the inference script:

    Execute the main inference script using Python 3:

    python3 vlm_navigation/inference.py

This script will load the VLM, potentially process images (depending on the script's functionality), and output the inference results based on the configuration and any specified navigation goal.

Metadata

Release files for vlm-inference 0.1.36

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vlm-inference 0.1.36
File Size Uploaded Provenance Actions
vlm_inference-0.1.36.tar.gz 11.2 kB Without provenance Details for vlm_inference-0.1.36.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vlm-inference 0.1.36
File Interpreter ABI Platform Actions
vlm_inference-0.1.36-py3-none-any.whl Python 3 none any Details for vlm_inference-0.1.36-py3-none-any.whl

Total release size: 22.6 kB

Release files / vlm_inference-0.1.36.tar.gz

Download URL vlm_inference-0.1.36.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fbd7120c4d7c4a866f5ec7e225d2789c95d4a679d657736a11c42a69e53908b6
BLAKE2b-256 checksum
How to use checksums
3c5d003ac9b94055c081f34ae25c2685932336ffcc4b4b8ca094d44dbec015e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / vlm_inference-0.1.36-py3-none-any.whl

Download URL vlm_inference-0.1.36-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6445b9cbd03368044cca8e9272483fe7ce5f08b40296ac0b99cc6f4a336e61f3
BLAKE2b-256 checksum
How to use checksums
6137765bc756dc4bcef7f4e58d9ce8bf3422640c4fe6bccfa3166805a6f4fb5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Security for vlm-inference 0.1.36

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.36 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page