Geson-anko / vrchat-io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VRChat IO

VRChat IO is a library for inputting data into and getting data from VRChat. (For AI, Machine Learnings.)

VRChat IOは、VRChatにデータを入力したり、VRChatから取得したりするためのライブラリです。

Installation

Supported Platforms

  • Windows 10, 11
  • Linux (Ubuntu, Debian, Arch Linux, etc...)

Command

pip install "git+https://github.com/Geson-anko/vrchat-io.git@main"

or clone this repository and run following command in the directory. (Installing from source.)

# ./vrchat-io
pip install -e .

VRChat

  1. Steamからインストール

    https://store.steampowered.com/app/438100/VRChat/

    Linux Userはこのサイトを参考にしてください

  2. VRChatを起動する

    Note: Steamの起動オプションに -screen-width <pixel> -screen-height <pixel>を設定すると常に同じサイズで出力されるので便利です。 起動オプション参考: https://docs.vrchat.com/docs/launch-options

  3. OSCを有効化する: https://docs.vrchat.com/docs/osc-overview

    Note: 起動オプションで inPort:outIP:outPortを設定できます。

OBS (For video capture)

VRChatの映像をキャプチャし、Pythonから取得するためにOBSの仮想カメラを用います。

  1. Download and Install OBS: https://obsproject.com

  2. 仮想カメラをインストール

  3. VRChatのウィンドウをキャプチャする。

Features

Video Capture

cam = VideoCapture(...)
frame = cam.read()
  • OpenCVVideoCapture

    cv2.VideoCaptureの簡易ラッパーです。readメソッドを用いて画像を読み出します。 取得する画像のwidth, heightは指定できますが、などはあくまでも期待される値であり、実際に得られる画像とは異なる場合があることに注意してください。

画像を任意のアスペクト比、解像度で必ず取得したい場合はvrchat_io.vrchat_io.vision.wrappers内部のRatioCropWrapperResizeWrapperを用いてください。

DEMOファイルはこちらです。

Controller

Future Features

(Implement below things in the future.)

  • Audio Capture: 統一されたAPIを定義し、VRChatの音声をキャプチャします。
  • OSC Output

Contributing

機能追加やバグ修正は大歓迎です!詳しくはCONTRIBUTING.mdを参照願います

About


Languages

Language:Python 98.9%Language:Makefile 1.1%