Update README.md
Browse files
README.md
CHANGED
|
@@ -74,12 +74,52 @@ The dataset enables **vision-action pretraining** on large-scale human gameplay
|
|
| 74 |
| VALORANT | 1 | **0.25 h (911.94 s)** | 911.94 s (15.20 min) |
|
| 75 |
|
| 76 |
## Usage Example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
```python
|
| 78 |
-
from
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
```
|
| 82 |
|
|
|
|
|
|
|
| 83 |
## Citation
|
| 84 |
If you find this work useful, please cite our paper:
|
| 85 |
```
|
|
|
|
| 74 |
| VALORANT | 1 | **0.25 h (911.94 s)** | 911.94 s (15.20 min) |
|
| 75 |
|
| 76 |
## Usage Example
|
| 77 |
+
|
| 78 |
+
```bash
|
| 79 |
+
pip install mcap-owa-support owa-msgs huggingface_hub
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
```python
|
| 83 |
+
from huggingface_hub import hf_hub_download
|
| 84 |
+
from mcap_owa.highlevel import OWAMcapReader
|
| 85 |
+
|
| 86 |
+
# Download MCAP and video files
|
| 87 |
+
mcap_file = hf_hub_download(
|
| 88 |
+
repo_id="open-world-agents/D2E-480p",
|
| 89 |
+
filename="Apex_Legends/0805_01.mcap",
|
| 90 |
+
repo_type="dataset"
|
| 91 |
+
)
|
| 92 |
+
video_file = hf_hub_download(
|
| 93 |
+
repo_id="open-world-agents/D2E-480p",
|
| 94 |
+
filename="Apex_Legends/0805_01.mkv",
|
| 95 |
+
repo_type="dataset"
|
| 96 |
+
)
|
| 97 |
|
| 98 |
+
# Load and iterate through messages
|
| 99 |
+
with OWAMcapReader(mcap_file) as reader:
|
| 100 |
+
# Screen frames with video loading
|
| 101 |
+
for msg in reader.iter_messages(topics=["screen"]):
|
| 102 |
+
screen = msg.decoded
|
| 103 |
+
screen.resolve_relative_path(mcap_file) # Resolve video path
|
| 104 |
+
frame = screen.load_frame_array() # Load actual frame from video
|
| 105 |
+
print(f"Frame: {frame.shape}")
|
| 106 |
+
break
|
| 107 |
+
|
| 108 |
+
# Keyboard events
|
| 109 |
+
for msg in reader.iter_messages(topics=["keyboard"]):
|
| 110 |
+
kbd = msg.decoded
|
| 111 |
+
print(f"Keyboard: {kbd.event_type} VK={kbd.vk}")
|
| 112 |
+
break
|
| 113 |
+
|
| 114 |
+
# Raw mouse events (we use this instead of "mouse", see why: https://open-world-agents.github.io/open-world-agents/env/plugins/desktop/#raw-mouse-input)
|
| 115 |
+
for msg in reader.iter_messages(topics=["mouse/raw"]):
|
| 116 |
+
mouse = msg.decoded
|
| 117 |
+
print(f"Mouse: dx={mouse.last_x} dy={mouse.last_y}")
|
| 118 |
+
break
|
| 119 |
```
|
| 120 |
|
| 121 |
+
For more details, see the [OWA Documentation](https://open-world-agents.github.io/open-world-agents/).
|
| 122 |
+
|
| 123 |
## Citation
|
| 124 |
If you find this work useful, please cite our paper:
|
| 125 |
```
|