langvio 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- langvio-0.0.1/.env.template +22 -0
- langvio-0.0.1/CHANGELOG.md +0 -0
- langvio-0.0.1/CONTRIBUTING.md +0 -0
- langvio-0.0.1/LICENSE +0 -0
- langvio-0.0.1/MANIFEST.in +20 -0
- langvio-0.0.1/PKG-INFO +445 -0
- langvio-0.0.1/README.md +384 -0
- langvio-0.0.1/docs/advanced/features.md +20 -0
- langvio-0.0.1/docs/getting-started/getting_started.md +123 -0
- langvio-0.0.1/docs/guides/configuration.md +248 -0
- langvio-0.0.1/docs/guides/examples.md +391 -0
- langvio-0.0.1/docs/index.md +190 -0
- langvio-0.0.1/docs/reference/api.md +342 -0
- langvio-0.0.1/examples/attribute_detection_example.py +67 -0
- langvio-0.0.1/examples/basic_detection_example.py +44 -0
- langvio-0.0.1/examples/combined_analysis_example.py +158 -0
- langvio-0.0.1/examples/config_examples/custom_model_config.yaml +39 -0
- langvio-0.0.1/examples/counting_example.py +72 -0
- langvio-0.0.1/examples/video_analysis.py +44 -0
- langvio-0.0.1/langvio/__init__.py +132 -0
- langvio-0.0.1/langvio/cli.py +120 -0
- langvio-0.0.1/langvio/config.py +190 -0
- langvio-0.0.1/langvio/core/__init__.py +0 -0
- langvio-0.0.1/langvio/core/base.py +46 -0
- langvio-0.0.1/langvio/core/pipeline.py +154 -0
- langvio-0.0.1/langvio/core/processor_manager.py +140 -0
- langvio-0.0.1/langvio/core/registry.py +130 -0
- langvio-0.0.1/langvio/core/visualization_manager.py +392 -0
- langvio-0.0.1/langvio/default_config.yaml +107 -0
- langvio-0.0.1/langvio/llm/__init__.py +12 -0
- langvio-0.0.1/langvio/llm/base.py +279 -0
- langvio-0.0.1/langvio/llm/factory.py +101 -0
- langvio-0.0.1/langvio/llm/google.py +74 -0
- langvio-0.0.1/langvio/llm/openai.py +73 -0
- langvio-0.0.1/langvio/media/__init__.py +0 -0
- langvio-0.0.1/langvio/media/image_visualizer.py +181 -0
- langvio-0.0.1/langvio/media/processor.py +90 -0
- langvio-0.0.1/langvio/media/video_visualizer.py +282 -0
- langvio-0.0.1/langvio/prompts/__init__.py +11 -0
- langvio-0.0.1/langvio/prompts/constants.py +32 -0
- langvio-0.0.1/langvio/prompts/templates.py +122 -0
- langvio-0.0.1/langvio/utils/__init__.py +0 -0
- langvio-0.0.1/langvio/utils/detection/__init__.py +28 -0
- langvio-0.0.1/langvio/utils/detection/compression.py +109 -0
- langvio-0.0.1/langvio/utils/detection/extraction.py +280 -0
- langvio-0.0.1/langvio/utils/file_utils.py +123 -0
- langvio-0.0.1/langvio/utils/llm_utils.py +935 -0
- langvio-0.0.1/langvio/utils/logging.py +53 -0
- langvio-0.0.1/langvio/utils/spatial/__init__.py +16 -0
- langvio-0.0.1/langvio/utils/spatial/relationships.py +179 -0
- langvio-0.0.1/langvio/vision/__init__.py +0 -0
- langvio-0.0.1/langvio/vision/base.py +159 -0
- langvio-0.0.1/langvio/vision/color_detection.py +371 -0
- langvio-0.0.1/langvio/vision/utils.py +299 -0
- langvio-0.0.1/langvio/vision/yolo/__init__.py +0 -0
- langvio-0.0.1/langvio/vision/yolo/detector.py +139 -0
- langvio-0.0.1/langvio/vision/yolo/image_processor.py +169 -0
- langvio-0.0.1/langvio/vision/yolo/result_formatter.py +368 -0
- langvio-0.0.1/langvio/vision/yolo/video_processor.py +452 -0
- langvio-0.0.1/langvio/vision/yolo/yolo11_utils.py +165 -0
- langvio-0.0.1/langvio.egg-info/PKG-INFO +445 -0
- langvio-0.0.1/langvio.egg-info/SOURCES.txt +71 -0
- langvio-0.0.1/langvio.egg-info/dependency_links.txt +1 -0
- langvio-0.0.1/langvio.egg-info/entry_points.txt +2 -0
- langvio-0.0.1/langvio.egg-info/requires.txt +33 -0
- langvio-0.0.1/langvio.egg-info/top_level.txt +1 -0
- langvio-0.0.1/pyproject.toml +89 -0
- langvio-0.0.1/setup.cfg +4 -0
- langvio-0.0.1/setup.py +65 -0
- langvio-0.0.1/webapp/app.py +456 -0
- langvio-0.0.1/webapp/templates/base.html +155 -0
- langvio-0.0.1/webapp/templates/index.html +154 -0
- langvio-0.0.1/webapp/templates/result.html +643 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Langvio Environment Configuration Template
|
|
2
|
+
# Copy this file to .env and fill in your API keys
|
|
3
|
+
|
|
4
|
+
# OpenAI Configuration (for GPT models)
|
|
5
|
+
OPENAI_API_KEY=your_openai_api_key_here
|
|
6
|
+
|
|
7
|
+
# Google AI Configuration (for Gemini models)
|
|
8
|
+
GOOGLE_API_KEY=your_google_api_key_here
|
|
9
|
+
|
|
10
|
+
# Optional: LangSmith Configuration (for tracing)
|
|
11
|
+
LANGCHAIN_TRACING_V2=false
|
|
12
|
+
LANGCHAIN_ENDPOINT=https://api.smith.langchain.com
|
|
13
|
+
LANGCHAIN_API_KEY=your_langsmith_api_key_here
|
|
14
|
+
LANGCHAIN_PROJECT=langvio
|
|
15
|
+
|
|
16
|
+
# Optional: Performance Settings
|
|
17
|
+
CUDA_VISIBLE_DEVICES=0
|
|
18
|
+
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
|
19
|
+
|
|
20
|
+
# Optional: Default Model Settings
|
|
21
|
+
LANGVIO_DEFAULT_LLM=gemini
|
|
22
|
+
LANGVIO_DEFAULT_VISION=yoloe_large
|
|
File without changes
|
|
File without changes
|
langvio-0.0.1/LICENSE
ADDED
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# MANIFEST.in - Include additional files in the package
|
|
2
|
+
include README.md
|
|
3
|
+
include LICENSE
|
|
4
|
+
include CHANGELOG.md
|
|
5
|
+
include CONTRIBUTING.md
|
|
6
|
+
include .env.template
|
|
7
|
+
recursive-include langvio *.yaml *.yml *.json
|
|
8
|
+
recursive-include examples *.py *.yaml *.md
|
|
9
|
+
recursive-include docs *.md
|
|
10
|
+
recursive-include webapp *.py *.html *.css *.js
|
|
11
|
+
prune tests
|
|
12
|
+
prune .git
|
|
13
|
+
prune .github
|
|
14
|
+
global-exclude *.pyc
|
|
15
|
+
global-exclude *.pyo
|
|
16
|
+
global-exclude *.orig
|
|
17
|
+
global-exclude *.rej
|
|
18
|
+
global-exclude *~
|
|
19
|
+
global-exclude __pycache__
|
|
20
|
+
global-exclude .DS_Store
|
langvio-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: langvio
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Connect language models to vision models for natural language visual analysis
|
|
5
|
+
Author: Your Name
|
|
6
|
+
Author-email: Mughees Mehdi <mugheesmehdi@gmail.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/MugheesMehdi07/langvio
|
|
9
|
+
Project-URL: Documentation, https://github.com/MugheesMehdi07/langvio#readme
|
|
10
|
+
Project-URL: Repository, https://github.com/MugheesMehdi07/langvio
|
|
11
|
+
Project-URL: Issues, https://github.com/MugheesMehdi07/langvio/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/MugheesMehdi07/langvio/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: computer-vision,llm,ai,yolo,langchain,object-detection
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
|
|
26
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
27
|
+
Requires-Python: >=3.8
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: torch>=1.9.0
|
|
31
|
+
Requires-Dist: ultralytics>=8.0.0
|
|
32
|
+
Requires-Dist: opencv-python>=4.5.0
|
|
33
|
+
Requires-Dist: numpy>=1.20.0
|
|
34
|
+
Requires-Dist: pillow>=8.0.0
|
|
35
|
+
Requires-Dist: langchain-core>=0.1.0
|
|
36
|
+
Requires-Dist: langchain-community>=0.0.10
|
|
37
|
+
Requires-Dist: pyyaml>=6.0
|
|
38
|
+
Requires-Dist: python-dotenv>=0.19.0
|
|
39
|
+
Requires-Dist: tqdm>=4.64.0
|
|
40
|
+
Provides-Extra: openai
|
|
41
|
+
Requires-Dist: openai>=1.0.0; extra == "openai"
|
|
42
|
+
Requires-Dist: langchain-openai>=0.0.1; extra == "openai"
|
|
43
|
+
Provides-Extra: google
|
|
44
|
+
Requires-Dist: google-generativeai<1.0.0,>=0.3.0; extra == "google"
|
|
45
|
+
Requires-Dist: langchain-google-genai>=2.0.0; extra == "google"
|
|
46
|
+
Provides-Extra: all-llm
|
|
47
|
+
Requires-Dist: langvio[google,openai]; extra == "all-llm"
|
|
48
|
+
Provides-Extra: webapp
|
|
49
|
+
Requires-Dist: flask>=2.0.0; extra == "webapp"
|
|
50
|
+
Requires-Dist: werkzeug>=2.0.0; extra == "webapp"
|
|
51
|
+
Provides-Extra: dev
|
|
52
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
54
|
+
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
55
|
+
Requires-Dist: isort>=5.10.0; extra == "dev"
|
|
56
|
+
Requires-Dist: flake8>=5.0.0; extra == "dev"
|
|
57
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
58
|
+
Dynamic: author
|
|
59
|
+
Dynamic: license-file
|
|
60
|
+
Dynamic: requires-python
|
|
61
|
+
|
|
62
|
+
# 🧠 Langvio: Natural Language Computer Vision
|
|
63
|
+
|
|
64
|
+
<dlangvioiv align="center">
|
|
65
|
+
|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
[](https://www.python.org/downloads/)
|
|
69
|
+
[](https://opensource.org/licenses/MIT)
|
|
70
|
+
[](https://badge.fury.io/py/langvio)
|
|
71
|
+
[](https://langvio.readthedocs.io/)
|
|
72
|
+
|
|
73
|
+
**Connect language models to vision models for natural language visual analysis**
|
|
74
|
+
|
|
75
|
+
[🚀 Quick Start](#-quick-start) • [📖 Documentation](https://langvio.readthedocs.io/) • [🎯 Examples](#-examples) • [🔧 Installation](#-installation) • [🤝 Contributing](#-contributing)
|
|
76
|
+
|
|
77
|
+
</dlangvioiv>
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## ✨ What is Langvio?
|
|
82
|
+
|
|
83
|
+
Langvio bridges the gap between **human language** and **computer vision**. Ask questions about images and videos in plain English, and get intelligent analysis powered by state-of-the-art vision models and language models.
|
|
84
|
+
|
|
85
|
+
### 🎯 Key Features
|
|
86
|
+
|
|
87
|
+
- **🗣️ Natural Language Interface**: Ask questions like "Count all red cars" or "Find people wearing yellow"
|
|
88
|
+
- **🎥 Multi-Modal Support**: Works with both images and videos
|
|
89
|
+
- **🚀 Powered by YOLO**: Uses YOLOv11 and YOLOe for fast, accurate object detection
|
|
90
|
+
- **🤖 LLM Integration**: Supports OpenAI GPT and Google Gemini for intelligent explanations
|
|
91
|
+
- **📊 Advanced Analytics**: Object counting, speed estimation, spatial relationships
|
|
92
|
+
- **🎨 Visual Output**: Generates annotated images/videos with detection highlights
|
|
93
|
+
- **🌐 Web Interface**: Includes a Flask web app for easy interaction
|
|
94
|
+
- **🔧 Extensible**: Easy to add new models and capabilities
|
|
95
|
+
|
|
96
|
+
## 🎬 See It In Action
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
import langvio
|
|
100
|
+
|
|
101
|
+
# Create a pipeline
|
|
102
|
+
pipeline = langvio.create_pipeline()
|
|
103
|
+
|
|
104
|
+
# Analyze an image
|
|
105
|
+
result = pipeline.process(
|
|
106
|
+
query="Count how many people are wearing red shirts",
|
|
107
|
+
media_path="street_scene.jpg"
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
print(result['explanation'])
|
|
111
|
+
# Output: "I found 3 people wearing red shirts in the image.
|
|
112
|
+
# Two are located in the center-left area, and one is on the right side."
|
|
113
|
+
|
|
114
|
+
# View the annotated result
|
|
115
|
+
print(f"Annotated image saved to: {result['output_path']}")
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 🔧 Installation
|
|
119
|
+
|
|
120
|
+
### Basic Installation
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pip install langvio
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### With LLM Provider Support
|
|
127
|
+
|
|
128
|
+
Choose your preferred language model provider:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# For OpenAI models (GPT-3.5, GPT-4)
|
|
132
|
+
pip install langvio[openai]
|
|
133
|
+
|
|
134
|
+
# For Google Gemini models
|
|
135
|
+
pip install langvio[google]
|
|
136
|
+
|
|
137
|
+
# For all supported providers
|
|
138
|
+
pip install langvio[all-llm]
|
|
139
|
+
|
|
140
|
+
# For development
|
|
141
|
+
pip install langvio[dev]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Environment Setup
|
|
145
|
+
|
|
146
|
+
1. **Create a `.env` file** for your API keys:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Copy the template
|
|
150
|
+
cp .env.template .env
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
2. **Add your API keys** to `.env`:
|
|
154
|
+
|
|
155
|
+
```env
|
|
156
|
+
# For OpenAI
|
|
157
|
+
OPENAI_API_KEY=your_openai_api_key_here
|
|
158
|
+
|
|
159
|
+
# For Google Gemini
|
|
160
|
+
GOOGLE_API_KEY=your_google_api_key_here
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
3. **Langvio automatically loads** these environment variables!
|
|
164
|
+
|
|
165
|
+
## 🚀 Quick Start
|
|
166
|
+
|
|
167
|
+
### Basic Usage
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
import langvio
|
|
171
|
+
|
|
172
|
+
# Create a pipeline (automatically detects available LLM providers)
|
|
173
|
+
pipeline = langvio.create_pipeline()
|
|
174
|
+
|
|
175
|
+
# Process an image
|
|
176
|
+
result = pipeline.process(
|
|
177
|
+
query="What objects are in this image?",
|
|
178
|
+
media_path="path/to/your/image.jpg"
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
print(result['explanation'])
|
|
182
|
+
print(f"Output: {result['output_path']}")
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Video Analysis
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
# Analyze videos with temporal understanding
|
|
189
|
+
result = pipeline.process(
|
|
190
|
+
query="Count vehicles crossing the intersection",
|
|
191
|
+
media_path="traffic_video.mp4"
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
# Get detailed analysis including speed and movement patterns
|
|
195
|
+
print(result['explanation'])
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Web Interface
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Launch the web interface
|
|
202
|
+
cd webapp
|
|
203
|
+
python app.py
|
|
204
|
+
|
|
205
|
+
# Visit http://localhost:5000 in your browser
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## 🎯 Examples
|
|
209
|
+
|
|
210
|
+
### Object Detection & Counting
|
|
211
|
+
|
|
212
|
+
```python
|
|
213
|
+
# Count specific objects
|
|
214
|
+
pipeline.process("How many cars are in this parking lot?", "parking.jpg")
|
|
215
|
+
|
|
216
|
+
# Find objects by attributes
|
|
217
|
+
pipeline.process("Find all red objects in this image", "scene.jpg")
|
|
218
|
+
|
|
219
|
+
# Spatial relationships
|
|
220
|
+
pipeline.process("What objects are on the table?", "kitchen.jpg")
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Video Analysis
|
|
224
|
+
|
|
225
|
+
```python
|
|
226
|
+
# Track movement patterns
|
|
227
|
+
pipeline.process("Track people walking through the scene", "crowd.mp4")
|
|
228
|
+
|
|
229
|
+
# Speed analysis
|
|
230
|
+
pipeline.process("What's the average speed of vehicles?", "highway.mp4")
|
|
231
|
+
|
|
232
|
+
# Activity detection
|
|
233
|
+
pipeline.process("Detect any unusual activities", "security_footage.mp4")
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Advanced Queries
|
|
237
|
+
|
|
238
|
+
```python
|
|
239
|
+
# Complex multi-part analysis
|
|
240
|
+
pipeline.process(
|
|
241
|
+
"Count people and vehicles, identify their locations, and note distinctive colors",
|
|
242
|
+
"street_scene.jpg"
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
# Verification tasks
|
|
246
|
+
pipeline.process("Is there a dog in this image?", "park_scene.jpg")
|
|
247
|
+
|
|
248
|
+
# Temporal analysis
|
|
249
|
+
pipeline.process("How many people entered vs exited the building?", "entrance.mp4")
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## 🏗️ Architecture
|
|
253
|
+
|
|
254
|
+
```mermaid
|
|
255
|
+
graph TD
|
|
256
|
+
A[User Query] --> B[LLM Processor]
|
|
257
|
+
B --> C[Query Parser]
|
|
258
|
+
C --> D[Vision Processor]
|
|
259
|
+
D --> E[YOLO Detection]
|
|
260
|
+
E --> F[Attribute Analysis]
|
|
261
|
+
F --> G[Spatial Relationships]
|
|
262
|
+
G --> H[Temporal Tracking]
|
|
263
|
+
H --> I[LLM Explanation]
|
|
264
|
+
I --> J[Visualization]
|
|
265
|
+
J --> K[Output]
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Core Components
|
|
269
|
+
|
|
270
|
+
- **🧠 LLM Processor**: Parses queries and generates explanations (OpenAI, Google Gemini)
|
|
271
|
+
- **👁️ Vision Processor**: Detects objects and attributes (YOLO, YOLOe)
|
|
272
|
+
- **🎨 Media Processor**: Creates visualizations and handles I/O
|
|
273
|
+
- **⚙️ Pipeline**: Orchestrates the entire workflow
|
|
274
|
+
|
|
275
|
+
## 📊 Supported Models
|
|
276
|
+
|
|
277
|
+
### Vision Models
|
|
278
|
+
- **YOLOv11** (nano, small, medium, large, extra-large)
|
|
279
|
+
- **YOLOe** (enhanced YOLO variants)
|
|
280
|
+
- Automatic model selection based on performance needs
|
|
281
|
+
|
|
282
|
+
### Language Models
|
|
283
|
+
- **OpenAI**: GPT-3.5 Turbo, GPT-4 Turbo
|
|
284
|
+
- **Google**: Gemini Pro, Gemini Flash
|
|
285
|
+
- Extensible architecture for adding more providers
|
|
286
|
+
|
|
287
|
+
## 🛠️ Configuration
|
|
288
|
+
|
|
289
|
+
### Custom Configuration
|
|
290
|
+
|
|
291
|
+
```yaml
|
|
292
|
+
# config.yaml
|
|
293
|
+
llm:
|
|
294
|
+
default: "gemini"
|
|
295
|
+
models:
|
|
296
|
+
gemini:
|
|
297
|
+
model_name: "gemini-2.0-flash"
|
|
298
|
+
model_kwargs:
|
|
299
|
+
temperature: 0.2
|
|
300
|
+
|
|
301
|
+
vision:
|
|
302
|
+
default: "yoloe_large"
|
|
303
|
+
models:
|
|
304
|
+
yoloe_large:
|
|
305
|
+
model_path: "yoloe-11l-seg-pf.pt"
|
|
306
|
+
confidence: 0.5
|
|
307
|
+
|
|
308
|
+
media:
|
|
309
|
+
output_dir: "./results"
|
|
310
|
+
visualization:
|
|
311
|
+
box_color: [0, 255, 0]
|
|
312
|
+
line_thickness: 2
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
```python
|
|
316
|
+
# Use custom configuration
|
|
317
|
+
pipeline = langvio.create_pipeline(config_path="config.yaml")
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Command Line Interface
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# Basic usage
|
|
324
|
+
langvio --query "Count the cars" --media image.jpg
|
|
325
|
+
|
|
326
|
+
# With custom configuration
|
|
327
|
+
langvio --query "Find red objects" --media scene.jpg --config custom.yaml
|
|
328
|
+
|
|
329
|
+
# List available models
|
|
330
|
+
langvio --list-models
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## 🌟 Advanced Features
|
|
334
|
+
|
|
335
|
+
### YOLO11 Solutions Integration
|
|
336
|
+
|
|
337
|
+
- **Object Counting**: Automatic boundary-crossing detection
|
|
338
|
+
- **Speed Estimation**: Real-time speed analysis for video
|
|
339
|
+
- **Advanced Tracking**: Multi-object tracking across frames
|
|
340
|
+
|
|
341
|
+
### Spatial Relationship Analysis
|
|
342
|
+
|
|
343
|
+
- **Positional Understanding**: "objects on the table", "cars in the parking lot"
|
|
344
|
+
- **Relative Positioning**: left/right, above/below, near/far relationships
|
|
345
|
+
- **Containment Detection**: objects inside other objects
|
|
346
|
+
|
|
347
|
+
### Temporal Analysis (Video)
|
|
348
|
+
|
|
349
|
+
- **Movement Patterns**: Track object trajectories and behaviors
|
|
350
|
+
- **Activity Recognition**: Detect activities and interactions
|
|
351
|
+
- **Temporal Relationships**: Understand object co-occurrence
|
|
352
|
+
|
|
353
|
+
### Color & Attribute Detection
|
|
354
|
+
|
|
355
|
+
- **Advanced Color Recognition**: 50+ color categories with confidence scoring
|
|
356
|
+
- **Size Classification**: Automatic small/medium/large categorization
|
|
357
|
+
- **Multi-attribute Analysis**: Combined color, size, and position analysis
|
|
358
|
+
|
|
359
|
+
## 🚀 Performance & Optimization
|
|
360
|
+
|
|
361
|
+
### Model Selection Strategy
|
|
362
|
+
|
|
363
|
+
```python
|
|
364
|
+
# Automatic model selection based on use case
|
|
365
|
+
pipeline = langvio.create_pipeline() # Uses best available model
|
|
366
|
+
|
|
367
|
+
# Manual model selection for specific needs
|
|
368
|
+
pipeline = langvio.create_pipeline(
|
|
369
|
+
vision_name="yoloe_large", # High accuracy
|
|
370
|
+
llm_name="gpt-4" # Advanced reasoning
|
|
371
|
+
)
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Optimization Tips
|
|
375
|
+
|
|
376
|
+
- **YOLOe models**: Better accuracy for complex scenes
|
|
377
|
+
- **YOLO11 models**: Faster processing for real-time applications
|
|
378
|
+
- **Confidence thresholds**: Adjust based on precision/recall needs
|
|
379
|
+
- **Frame sampling**: Control video processing speed vs accuracy
|
|
380
|
+
|
|
381
|
+
## 🤝 Contributing
|
|
382
|
+
|
|
383
|
+
We welcome contributions! Here's how to get started:
|
|
384
|
+
|
|
385
|
+
### Development Setup
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# Clone the repository
|
|
389
|
+
git clone https://github.com/yourusername/langvio.git
|
|
390
|
+
cd langvio
|
|
391
|
+
|
|
392
|
+
# Install in development mode
|
|
393
|
+
pip install -e .[dev]
|
|
394
|
+
|
|
395
|
+
# Run tests
|
|
396
|
+
pytest
|
|
397
|
+
|
|
398
|
+
# Format code
|
|
399
|
+
black langvio/
|
|
400
|
+
isort langvio/
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Contributing Guidelines
|
|
404
|
+
|
|
405
|
+
1. **Fork** the repository
|
|
406
|
+
2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
|
|
407
|
+
3. **Commit** your changes (`git commit -m 'Add amazing feature'`)
|
|
408
|
+
4. **Push** to the branch (`git push origin feature/amazing-feature`)
|
|
409
|
+
5. **Open** a Pull Request
|
|
410
|
+
|
|
411
|
+
## 📚 Documentation
|
|
412
|
+
|
|
413
|
+
- **📖 [Full Documentation](https://langvio.readthedocs.io/)**: Comprehensive guides and API reference
|
|
414
|
+
- **🎯 [Examples](./examples/)**: Ready-to-run example scripts
|
|
415
|
+
- **🌐 [Web App](./webapp/)**: Flask web interface for easy testing
|
|
416
|
+
- **⚙️ [Configuration](./examples/config_examples/)**: Sample configuration files
|
|
417
|
+
|
|
418
|
+
## 🔗 Links & Resources
|
|
419
|
+
|
|
420
|
+
- **🐙 [GitHub Repository](https://github.com/yourusername/langvio)**
|
|
421
|
+
- **📦 [PyPI Package](https://pypi.org/project/langvio/)**
|
|
422
|
+
- **📖 [Documentation](https://langvio.readthedocs.io/)**
|
|
423
|
+
- **🐛 [Issue Tracker](https://github.com/yourusername/langvio/issues)**
|
|
424
|
+
- **💬 [Discussions](https://github.com/yourusername/langvio/discussions)**
|
|
425
|
+
|
|
426
|
+
## 📄 License
|
|
427
|
+
|
|
428
|
+
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
|
|
429
|
+
|
|
430
|
+
## 🙏 Acknowledgments
|
|
431
|
+
|
|
432
|
+
- **Ultralytics** for the amazing YOLO models
|
|
433
|
+
- **LangChain** for LLM integration framework
|
|
434
|
+
- **OpenAI** and **Google** for language model APIs
|
|
435
|
+
- **OpenCV** for computer vision utilities
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
<div align="center">
|
|
440
|
+
|
|
441
|
+
**⭐ Star us on GitHub if Langvio helps you!**
|
|
442
|
+
|
|
443
|
+
[⭐ Star](https://github.com/yourusername/langvio) • [🔗 Share](https://twitter.com/intent/tweet?text=Check%20out%20Langvio%20-%20Natural%20Language%20Computer%20Vision!&url=https://github.com/yourusername/langvio) • [🐛 Report Bug](https://github.com/yourusername/langvio/issues)
|
|
444
|
+
|
|
445
|
+
</div>
|