Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.21 KB

README.md

File metadata and controls

56 lines (37 loc) · 1.21 KB

Mask R-CNN of TensorFlow 2

Environment

Install TensorFlow 2.0 and other dependencies:

# CUDA 11.8 + cuDNN 8.6 + Python 3.10
conda env create -f conda-cu11-py310.yaml
# Apple Silicon + Python 3.11
conda env create -f conda-apple-py311.yaml

Uninstall:

conda env remove --name py311-apple-tfrcnn

Note that environment variables such as LD_LIBRARY_PATH must be set properly on a GPU machine:

set -Ux CUDNN_PATH $CONDA_PREFIX/lib/python3.1/site-packages/nvidia/cudnn
set -Ux LD_LIBRARY_PATH $LD_LIBRARY_PATH $CONDA_PREFIX/lib $CUDNN_PATH/lib
set -Ux XLA_FLAGS --xla_gpu_cuda_data_dir=$CONDA_PREFIX

Usage

Train the RPN part:

tf-rcnn train-rpn --epochs=10 --batch-size=8

Predict the region of interest (ROI):

tf-rcnn predict-rpn --images=20

Result of the ROI prediction after 5 epochs:

ROI prediction

Performance of the ROI prediction after 5 epochs:

All in One Scripts

References