Important Note: This project is designed to be used for the Encord-Active data centric challenge, please use the original project for training Encord-Active projects
This example implements an end-to-end training and evaluation procedure for Mask R-CNN in PyTorch using Encord Active.
- The target project should follow the COCO format. You can use Encord-Active's export functionality to create COCO annotations.
- Trained model can be evaluated on any dataset using the Encord-Active.
Create a new conda virtual environment using the following command
# inside the project directory
conda env create -f environment.yml
Verify that the new environment is installed correctly:
conda env list
You should see the encord-maskrcnn
example in the list. Simply activate it with the following command:
conda activate encord-maskrcnn
- You can use Encord-Active's Actions tab to create COCO annotations.
- Create a config.ini file by looking at the example_config.ini
- You can resize the images and corresponding annotations via utils/downscale_dataset.py.
- For the training, the only required fields are [DATA], [LOGGING], and [TRAIN] sections.
- Activate the environment and run
python train.py
- You can track the progress of the training on wandb platform.
- Get the wandb ID from the experiment that you want to use for inference
- Fill the [INFERENCE] section of the config.ini file
- Run
python generate_ea_predictions.py
to generate a pickle file. - Run the following command to convert pickle file into Encord Active predictions.
encord-active import predictions /path/to/predictions.pkl -t /path/to/project
- Open the app. Now you can see the model performance on the Model Quality tab.