Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: π’
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: red
|
|
@@ -13,4 +13,75 @@ tags:
|
|
| 13 |
- mcp-in-action-track-creative
|
| 14 |
---
|
| 15 |
|
| 16 |
-
Check out the Hackathon details at: https://huggingface.co/MCP-1st-Birthday
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: CV MCP Client
|
| 3 |
emoji: π’
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: red
|
|
|
|
| 13 |
- mcp-in-action-track-creative
|
| 14 |
---
|
| 15 |
|
| 16 |
+
Check out the Hackathon details at: https://huggingface.co/MCP-1st-Birthday
|
| 17 |
+
|
| 18 |
+
# π₯ Computer Vision MCP Client
|
| 19 |
+
|
| 20 |
+
A Model Context Protocol (MCP) client that streams webcam images and retrieves detailed scene analysis from the MCP server.
|
| 21 |
+
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
## π Features
|
| 25 |
+
|
| 26 |
+
- Real-time scene description
|
| 27 |
+
- Human detection
|
| 28 |
+
- Animals and objects detection
|
| 29 |
+
- Environment classification (indoor/outdoor)
|
| 30 |
+
- Lighting condition analysis
|
| 31 |
+
- Hazards identification
|
| 32 |
+
- Optimized for context window efficiency
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## π§ How It Works
|
| 37 |
+
|
| 38 |
+
This Gradio Space uses a MCP server to analyze webcam images:
|
| 39 |
+
|
| 40 |
+
1. Capture an image via webcam.
|
| 41 |
+
2. Convert the image to Base64 format.
|
| 42 |
+
3. Send the image along with your Hugging Face token to the MCP server.
|
| 43 |
+
4. Receive detailed scene analysis, including:
|
| 44 |
+
- Description of the scene
|
| 45 |
+
- Detected humans
|
| 46 |
+
- Animals and objects
|
| 47 |
+
- Environment type (indoor/outdoor)
|
| 48 |
+
- Lighting condition
|
| 49 |
+
- Hazards
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
## β‘ Demo
|
| 54 |
+
|
| 55 |
+
Use your webcam to stream images and receive real-time scene analysis.
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
## π Requirements
|
| 60 |
+
|
| 61 |
+
- **Hugging Face API Token** is required for the MCP server to process images.
|
| 62 |
+
- Set your token as an environment variable locally: `HF_TOKEN`.
|
| 63 |
+
- Without a valid token, the app will display an error message.
|
| 64 |
+
|
| 65 |
+
> **Note:** This project uses a personal Hugging Face token for server access. Public users of the Space will be using your account, so be mindful of token usage limits.
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## π Usage
|
| 70 |
+
|
| 71 |
+
1. Open the Space and allow webcam access.
|
| 72 |
+
2. Stream images via the webcam.
|
| 73 |
+
3. View the outputs in the textboxes:
|
| 74 |
+
- Description
|
| 75 |
+
- Environment
|
| 76 |
+
- Indoor/Outdoor
|
| 77 |
+
- Lighting Condition
|
| 78 |
+
- Human Detected
|
| 79 |
+
- Animals Detected
|
| 80 |
+
- Objects Detected
|
| 81 |
+
- Hazards Identified
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
## β οΈ Note
|
| 86 |
+
|
| 87 |
+
This project demonstrates a client-side MCP integration. The token used in this Space is tied to the deployer's Hugging Face account. To avoid exposing your token to the public, consider using OAuth login so users can use their own Hugging Face tokens.
|