Skip to content

nigelhartman/PokerAssistant

Repository files navigation

♣️ Poker AI Assistant (Roboflow)

A Meta Quest application that uses computer vision and Poker Odds API to calculate poker hand strenght in real time.

Poker AI Assistant

🎴 Demo

PokerAIAssistant_Compressed.mp4

🔎 Overview

  • This project uses computer vision to scan poker game cards and runs simulation engine to calculate hand equity in real-time.
  • It provides instant, data-driven insights direcly in your field of view, helping players make mathematically optimal decisions.

🏢 Architecture

Screenshot 2025-09-21 210133

Applications/Packages


🚀 Project Setup

1. Clone this Repository

git clone https://github.com/nigelhartm/MetaPCARoboflow.git

2. Setup Roboflow Inference Server (required)

👉 https://github.com/roboflow/inference

To run AI inference, you need to start a local Roboflow Inference Server on your computer (PC or Mac). This project does not run the model directly on the Meta Quest or on-device. Instead, it sends images from Unity or your headset to the inference server running on your desktop. For CUDA I recommend this link https://developer.nvidia.com/cuda-downloads


3. Setup Node.js Backend (required)

  • Initialize Node.js environment in the backend folder:
npm install
  • Start the server:
node server.js
  • The Node.js backend handles communication between Roboflow inference and your Unity/Meta Quest app.

4. Roboflow API Key Setup 🔑

  • Create a file Assets/Secrets/APIKeys.cs with your API key:
public static class APIKeys
{
    public const string RF_API_KEY = "your-roboflow-api-key";
}

5. Run Unity Sample

  • Open Main.unity in Unity.
  • Update the IP addresses in RoboflowCaller.cs to match your local inference servers:
[SerializeField] private string LOCAL_SERVER_IP_ADDRESS = "http://YOUR_COMPUTER_IP:9001";        // Main scene
[SerializeField] private string LOCAL_SERVER_POKER_IP_ADDRESS = "http://YOUR_COMPUTER_IP:3000"; // PokerOdd scene
  • Build the project for Android (XR Plugin Management > Oculus).
  • Deploy and run on Meta Quest with permissions for camera and local network access.

⚠️ Server not running: Don't forget that the server need to be started before and the first call takes up to a minute to download the model before!


📝 Project Overview

Unity Objects

  • WebCamTextureManager - Use the Passthrough Camera of Meta Quest
  • EnvironmentRaycastManager - Using Meta’s Depth API to get the distance to objects
  • RoboflowCaller - Entire Application logic
  • BuildingBlocks - Meta XR blocks for easy integration & project setup.
  • HandActivator - Turn on Hand GUI if watching on inner hand

Possbile Problems

  • Internet Connection - Ensure your app has a secure and stable internet connection.
  • IP Address - Verify that the IP address in your “RoboflowCaller” object is correct.
  • Local Inference - Make sure your Docker and Roboflow Local Inference are running. The first time you start, the model may take a few minutes to download.
  • Poker Odds Server - Confirm that the Node.js Poker Odds Server is active and running.
  • Permissions - On Meta Quest, double-check that all necessary permissions are enabled in the settings.

Relevant Sources & Opportunities


Resources & Credits

PokerAssets: https://github.com/zardtomcat
Icons: Freepik - Flaticon


📄 License

MIT – Free to use, modify and learn from.

About

Improve your Poker skills, using an assistant on your smartglasses. (MetaQuest)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors