
Set up your python environment and install the necessary free software across Windows, Mac, and Linux, then follow the recommended installation resources to be ready for the course.
Set up your environment with the cocosynth repo, Anaconda, and Visual Studio Code, then configure TensorFlow GPU, CUDA, and cuDNN for Mask R-CNN on synthetic data.
Navigate the end-to-end flow of creating COCO datasets: view COCO JSON data and segmentation outlines in a Jupyter notebook, generate masks, convert to COCO instances, and train a Mask R-CNN.
Explore the COCO image viewer in a Jupyter notebook to open COCO datasets, view the json annotations, run-length encoding, and bounding boxes, and inspect images with info, licenses, and categories.
Open the coco_image_viewer.ipynb in a Jupyter notebook to explore a COCO dataset json, view descriptions, categories, images, and bounding boxes, and learn how the viewer displays outlines and regions.
Open the image, calculate an adjusted display size with a 600-pixel max width, and overlay colored segmentation regions while preparing dictionaries for bounding boxes, polygons, run-length encoding regions, and colors.
Decode run-length encoding for Coco segmentation by iterating the counts array, computing x and y from the pixel index, and drawing vertical one-pixel-wide rectangles to render the crowds.
Create a small dataset by photographing boxes, generate color-coded masks with a unique color per box on a black background, and build a mask definitions JSON for COCO conversion.
Create a mask by drawing solid color shapes on a black background using the lasso and polygon tools, disable anti aliasing and feather edges, then export the mask.
Soundtrack by Silk Music: http://www.youtube.com/SilkMusic
Track name: LTN - Thunderball
Learn to convert mask definitions into a COCO dataset using a Python script, with command-line arguments for mask definition and dataset info, and assemble licenses, categories, images, and annotations.
Validate and process command line arguments to ensure mask definition and dataset info files exist, load JSON configurations, and build a COCO info dictionary for dataset creation.
Generate license and category entries for the coco dataset by building license and category objects, mapping category ids by name, and assembling the coco instances section for annotation processing.
Create annotations for COCO datasets by iterating over isolated masks, extracting contours with image measures, converting to polygons, and assembling segmentation and bounding boxes.
Use the foreground select tool to cut out the foreground. Scale to 640 by 480, apply feather edges, draw foreground, background, and unknown, then paste on a new layer.
Master the foreground select tool to accurately isolate objects, apply feathered edges, and export transparent PNGs by cropping to content for robust COCO dataset training images.
Use the free select tool with feather edges to cut box-like images, fade with a small feather radius, then copy, paste on a new layer, crop, and export.
Paste foregrounds onto backgrounds to create images with transparent areas using a Python script. Automatically generate masks and a JSON mask file to produce transformed image combinations for neural network training.
Extract and serialize masks and super categories by converting sets to lists, then write a json file containing masks, colors, and category data for each image.
the image composition class fuses foregrounds and backgrounds by random placement and transformations to generate synthetic combined images, controlled by input/output directories, count, width, height, and output type.
Compose images by pasting a foreground onto a background at a random position. Create an alpha mask from the alpha channel and apply a threshold for a COCO datasets mask.
Create and save composite and mask images with a standardized file naming scheme, generate color categories for each foreground, and build the mask json for COCO datasets.
Generate dataset info automatically for coco datasets by prompting for description, url, version, contributor, and date created, optionally adding an image license, and writing json output.
Train a mask rcnn in Jupiter notebook to detect and outline objects, creating thousands of training images and hundreds of validation images for a model that recognizes your custom objects.
Explore how mask r-cnn produces bounding boxes and pixel masks, and learn to create, train, and evaluate a coco-style dataset with training and validation splits.
Clone the mask rcnn repository, install requirements, and configure paths and class counts for training with a synthetic coco dataset, then load and preview samples.
Run inference on test images with a trained model, loading pretrained weights and using an 85–90% confidence threshold. See detections of X Box One, Google Wi-Fi box, and keyboard box.
In this course, you'll learn how to create your own COCO dataset with images containing custom object categories. You'll learn how to use the GIMP image editor and Python code to automatically generate thousands of realistic, synthetic images with minimal manual effort. I'll walk you through all of the code, which is available on GitHub, so that you can understand it at a fundamental level and modify it for your own needs.
(Important: If you only want to do manual image annotation, this course is not for you. Google "coco annotator" for a great tool you can use. This course teaches how to generate datasets automatically.)
By the end of this course, you will:
Have a full understanding of how COCO datasets work
Know how to use GIMP to create the components that go into a synthetic image dataset
Understand how to use code to generate COCO Instances Annotations in JSON format
Create your own custom training dataset with thousands of images, automatically
Train a Mask R-CNN to spot and mark the exact pixels of custom object categories
Be able to apply this knowledge to real world problems
I've saved weeks of my precious time using this method because I'm not doing the tedious task of manual image labeling, which can easily take a full 40 hour work week to create 1000 images. You should value your time too. After all, how are you going to solve the world's problems if you're busy clicking outlines on images for the next couple weeks?
Soundtrack by Silk Music
Track name: Shingo Nakamura - Hakodate