Patrick Grady, Jeremy A. Collins, Chengcheng Tang, Christopher D. Twigg, Kunal Aneja, James Hays, Charles C. Kemp
First, create a new conda environment.
conda create -n pv2 python=3.11
conda activate pv2
Install PyTorch with CUDA support. As installation is highly dependent on your setup, we refer to the official PyTorch website.
Install the segnentation-models-pytorch
project. This must be done by cloning from git.
git clone https://github.com/qubvel/segmentation_models.pytorch
pip install -e segmentation_models.pytorch/
Clone this repo and install the requirements.
git clone https://github.com/pgrady3/pressurevision2.git
cd pressurevision2
pip install -r requirements.txt
To download the model checkpoint, follow this link and create a data
and model
folder such that the file resides in data/model/paper_29.pth
Unfortunately, our team is still working on dataset hosting. As a result, the release of the dataset is slightly delayed, and training and evaluation is not possible at this time.
To render results from the trained model on the test set:
python -m prediction.make_network_movie --config paper
To train a model:
python -m prediction.trainer --config paper
To generate the paper's evaluation metrics:
python -m prediction.evaluator --config paper
To visualize a random sequence from the dataset
python -m recording.view_sequence
To run the demo:
python -m prediction.demo_webcam --config paper
While simply running the demo is easy, there are a few steps recommended to achieve the best results. We recommend assembling the following parts. This specific model of webcam is well-tested, but you can use any model.
- Logitech Brio 4k webcam. Amazon Link
- Table camera mount. Amazon Link
- Long USB C-to-A cable. Amazon Link
Next, set up the hardware. The system works well when illuminated by indoor lighting, and the camera is mounted ~55cm above the table, pointing down at a roughly 45 degree angle, as pictured.
Finally, run the demo script.