Skip to main content

No project description provided

Project description

Train and test a MASK-RCNN model

Python 3.10

Tools to train and test a Mask-RCNN model using PyTorch.

He, Kaiming, Georgia Gkioxari, Piotr Dollár, et Ross Girshick. « Mask R-CNN ».
arXiv, 24 janvier 2018. http://arxiv.org/abs/1703.06870.

Installation

The scripts should be installed in your environment using pip by including the following line in your requirements.txt file.

git+ssh://git@gitlab.univ-lr.fr/acadiie/document_layout_analysis/mask-rcnn.git#egg=mask-rcnn

Usage

train_mask_rcnn

usage: train_mask_rcnn [-h] --data-path DATA_PATH --experiment-name EXPERIMENT_NAME --epochs EPOCHS [--batch-size BATCH_SIZE] [--device DEVICE] [--log-path LOG_PATH] [--mlflow-endpoint MLFLOW_ENDPOINT]

Train a Mask-RCNN model based on ResNet-50

options:
  -h, --help            show this help message and exit
  --data-path DATA_PATH
                        Path to the directory where are stored the images and labels. In this directory, there should be a train and a val subdirectory, each containing another images and labels subdirectories.
  --experiment-name EXPERIMENT_NAME
                        Name of the experiment
  --epochs EPOCHS, -e EPOCHS
                        Number of epochs
  --batch-size BATCH_SIZE, -bs BATCH_SIZE
                        Batch size for the model
  --device DEVICE, -d DEVICE
                        Device on which to run the neural network
  --log-path LOG_PATH   Where to log the model steps
  --mlflow-endpoint MLFLOW_ENDPOINT
                        URL to a MLFlow tracking system

test_mask_rcnn

usage: Test Mask-RCNN model. [-h] --data-path DATA_PATH --model-checkpoint MODEL_CHECKPOINT [--threshold THRESHOLD]

options:
  -h, --help            show this help message and exit
  --data-path DATA_PATH
                        Path to the directory where are stored the images and labels. In this directory, there should be a test directory containing another images and labels subdirectories.
  --model-checkpoint MODEL_CHECKPOINT
                        Path to the model checkpoint to test
  --threshold THRESHOLD
                        Confidence threshold in the model to export the masks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page