Plug-and-play perception brain for robots
Project description
AdamEyes
Plug-and-play perception library for robotics (v0.1.1)
AdamEyes is a lightweight Python perception library that provides a modular vision pipeline for robots using a single RGB camera. It bundles object detection, monocular depth estimation, visual odometry, mapping, and grid-based planning into a simple, ROS-free API.
AdamEyes focuses on clarity, modularity, and correctness, making it suitable for research, learning, prototyping, and early-stage robotic systems.
What AdamEyes Provides (v0.1.1)
AdamEyes can:
Capture live frames from a camera
Detect objects using YOLO
Estimate relative depth from a single RGB camera
Track relative motion using visual odometry (SLAM-lite)
Generate a 2D occupancy grid
Plan paths on the grid using A*
Visualize perception and maps for debugging
AdamEyes is a perception library, not a full robot controller. It does not issue motor commands or make behavior decisions.
Design Philosophy
ROS-free, pure Python
Single entry point (AdamEyes)
Blackboard-style shared state
Config-driven behavior
Visualization is optional and for humans
AdamEyes computes machine-readable signals that higher-level robotic systems can consume to make decisions.
Installation
Requirements
Python 3.8+
USB camera or compatible video source
OpenCV-compatible system (Windows, Linux, macOS)
Install from PyPI
pip install adameyes
Development install
git clone https://github.com/yourusername/adameyes.git
cd adameyes
pip install -e .
Quick Start
from adameyes import AdamEyes
import cv2
eyes = AdamEyes()
while True:
state = eyes.update()
eyes.draw()
if state.objects:
print(f"Detected {len(state.objects)} objects")
if cv2.waitKey(1) & 0xFF == ord('q'):
break
eyes.close()
This runs:
live camera capture
object detection
depth estimation
mapping
visualization
Core API
AdamEyes
AdamEyes(
config=None,
**override
)
config: path to a YAML configuration file
override: keyword overrides for configuration values
Main Methods
Method Description update() Run one perception cycle and update state plan(goal) Compute a path on the occupancy grid draw() Visualize camera feed and map close() Release camera and close windows
State Object (Primary Output)
update() returns a State object containing all perception results.
state.frame # RGB camera frame (numpy array)
state.fps # Frames per second
state.objects # List of detected objects
state.depth_map # Relative depth map
state.pose # Relative pose (x, y, yaw)
state.grid # Occupancy grid (0 = free, 1 = obstacle)
state.path # Planned path (if any)
Detected Object Format
{
"label": "person",
"confidence": 0.87,
"bbox": (x1, y1, x2, y2)
}
All values are machine-readable and intended for higher-level decision logic.
Usage Examples
Example 1: Object Detection Only
from adameyes import AdamEyes
eyes = AdamEyes()
while True:
state = eyes.update()
for obj in state.objects:
print(f"{obj['label']} (conf: {obj['confidence']:.2f})")
Example 2: Path Planning on Occupancy Grid
from adameyes import AdamEyes
import cv2
eyes = AdamEyes()
goal = (200, 300)
while True:
state = eyes.update()
path = eyes.plan(goal)
if path:
next_waypoint = path[0]
# Send waypoint to your robot controller
eyes.draw()
if cv2.waitKey(1) & 0xFF == ord('q'):
break
eyes.close()
Example 3: Custom Configuration
from adameyes import AdamEyes
eyes = AdamEyes(
config="config.yaml",
logging={"save": True, "level": "INFO"}
)
state = eyes.update()
print("Pose:", state.pose)
if state.grid is not None:
print("Grid shape:", state.grid.shape)
if state.depth_map is not None:
print("Depth shape:", state.depth_map.shape)
⚙️ Configuration (v0.1.1)
AdamEyes is configured using YAML or keyword overrides.
Supported Configuration
camera:
index: 0
resolution: [640, 480]
detection:
model: "yolov8n.pt"
conf: 0.5
depth:
model: "midas_small"
slam:
features: 2000
logging:
level: "INFO"
save: false
folder: "logs"
Load configuration
eyes = AdamEyes(config="config.yaml")
Override parameters
eyes = AdamEyes(
camera={"resolution": [320, 240]},
detection={"conf": 0.3}
)
Visualization Notes
draw() uses OpenCV GUI windows
Visualization is optional
Headless systems should not call draw()
Performance Notes
Depth estimation is computationally expensive on CPU
FPS may range from 3–10 FPS on CPU systems
GPU acceleration (if available) improves performance significantly
Lowering camera resolution improves FPS
AdamEyes prioritizes correctness and clarity over raw speed in v0.1.0.
📁 Project Structure
adameyes/
├── core/ # Brain and shared state
├── modules/ # Camera, detection, depth, SLAM, mapping, planning
├── utils/ # Configuration and logging
├── viz/ # Visualization helpers
Basic Smoke Test
from adameyes import AdamEyes
eyes = AdamEyes()
state = eyes.update()
assert state.frame is not None
print("AdamEyes v0.1.0 working correctly")
eyes.close()
Roadmap
Planned for future releases:
Module enable/disable flags
Metric depth scaling
Improved SLAM backend
Costmap-based planning
ROS 2 integration
Simulation / no-camera mode
License
MIT License. See LICENSE for details.
Acknowledgments
YOLO – Object detection
MiDaS – Monocular depth estimation
OpenCV – Computer vision
A clean, modular perception library for robotics.
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 adameyes-0.1.1.tar.gz.
File metadata
- Download URL: adameyes-0.1.1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cab76a075168120414628f0a559af9d719687a08edb95b98f5b6f9af4229e6ad
|
|
| MD5 |
cdd23e9f27ad8e2e04457269de761656
|
|
| BLAKE2b-256 |
6c0f61160feed37f413eb4400d86bfab88bf0d7df35a179a7fa7b986f4501747
|
File details
Details for the file adameyes-0.1.1-py3-none-any.whl.
File metadata
- Download URL: adameyes-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c3332681ed7a8ffbe86d77fcae29bacce82d43afa14b96e2ec0fa3dd45e4db1
|
|
| MD5 |
f794af082cf3c72521c2a0e4cbde8aa7
|
|
| BLAKE2b-256 |
ee865e865ef4139fe98a3e6738e793003e834632efc3e074156a5a9b0b292694
|