Python Client for UnrealCV
This is the official Python client for UnrealCV, a project to help computer vision researchers build virtual worlds using Unreal Engine.
Installation
pip install unrealcv
Quick Start
Launch a game with the UnrealCV plugin, then connect from Python:
from unrealcv import client
client.connect() # Connect to the game
if not client.isconnected():
print('UnrealCV server is not running.')
else:
# Capture an image
filename = client.request('vget /camera/0/lit')
print(f'Image saved to {filename}')
# Get camera location
location = client.request('vget /camera/0/location')
print(f'Camera at: {location}')
High-Level API
For more advanced usage (image processing, object manipulation, camera control), use the UnrealCv_API class:
from unrealcv import UnrealCv_API
api = UnrealCv_API(port=9000, ip='127.0.0.1', resolution=(640, 480))
# Get an RGB image as a numpy array
image = api.get_image(0, 'lit')
# Get depth map
depth = api.get_depth(0)
# List all objects in the scene
objects = api.get_objects()
for obj in objects:
location = api.get_obj_location(obj)
print(f'{obj}: {location}')
# Annotation helpers and asset-path spawning
api.annotate_world()
spawned = api.spawn_object_from_path('/Engine/BasicShapes/Cube.Cube', 'SpawnedFromPath')
api.clear_world_annotation()
Note: The high-level API requires
opencv-python,numpy, andpillow.
Documentation
Links
Metadata
Release files for UnrealCV 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unrealcv-1.3.2.tar.gz | 49.6 kB | Without provenance | Details for unrealcv-1.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unrealcv-1.3.2-py3-none-any.whl | Python 3 | none | any | Details for unrealcv-1.3.2-py3-none-any.whl |
Total release size: 101.8 kB
Release files / unrealcv-1.3.2.tar.gz
| Download URL | unrealcv-1.3.2.tar.gz |
|---|---|
| Size | 49.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb6eacfd0bd6a19a14c8695770960ce9ddc76a8dd7aa696b557601aeeb345ad2
|
|
BLAKE2b-256 checksum How to use checksums |
31cbf52971b2750e1df4e810a4980ce00ba81b3bd51516939cf52e4776f3e1eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / unrealcv-1.3.2-py3-none-any.whl
| Download URL | unrealcv-1.3.2-py3-none-any.whl |
|---|---|
| Size | 52.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f41c8942d2ebfd6c2e619632792f267ff937ed823a6946fbb71f322d4a78d637
|
|
BLAKE2b-256 checksum How to use checksums |
d7b46b0b4b77aeae30522c19bbabf1a9eda36cceec01fda4e749032ac88d4310
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for UnrealCV 1.3.2
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.