Welcome to the Pit.
Make your fortune in the open outcry pits. Learn the hand signals and scalp your way to profit!
pit-trader-2-hd-24-1280-720-med-compressed.mp4
-
/train
: Training data webcam capture and labeling using opencv + mediapipe. -
/model
: notebook(s) ingest training data for NN, Logistic Regression and SVC classifiers. Current deploy uses Logistic Regression. -
/web
: React-based game. Uses onnyx runtime and mediapipe for live inference.
- Clone this repository
docker-compose up
- Pit Trader game:
http://localhost:3000
- Training and model environments:
#
# Models: get access url for notebooks via jupyter server logs
#
docker logs pit-trader_pytorch-minimal-notebook_1
#
# Train: Python env
#
./docker_run.sh
python train/webcam_trainer.py
#
# Frontend Game Env
#
./docker_run_web.sh
npm test
npm run lint
(etc)
pytorch-minimal-notebook
:`
- jupyter/minimal-notebook:notebook-6.4.12
- python related packages: conda, pytorch, opencv (cv2), mediapipe
web
:
- node:18.12.1
These are taken care of in docker-compose.yml
, docker_run.sh
, but are noted
here:
- To "receive" GUI run:
xhost +local:docker
on host before entering docker environment. docker exec
necessary to passDISPLAY
env variable- Need to bind mount
/tmp/.X11-unix
user:root
needed to accessdev/video0
webcam and docker group with privileges- Ensure
docker-compose.yml
: webcam mapped at/dev/video0
for training inpytorch-minimal-notebook
container.