Skip to content

wwagner4/py-greenscreen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

greenscreen

Introduction

Automated background removal of greenscreen images can be tricky sometime.

tricky example tricky example

To solve these problems training a machinelearning model could be helpful.

Setup example

For a proof of concept I produced some example greenscreen images using the following setup.

photo setup

I did not take much care about light and othe environmental issues, as the plan was to let the machinelearning software taking care of these problems.

The following images adress some of the expected problems.

shooting 01 problem

Object contains green.

shooting 01 problem

Green reflections on the objects

Dark shadows on the green surface

Small images 'img100'

In order to get the trainig and testing up and running the images where scaled to a very small size (133 px x 100 px).

Example

Example

Example

Example

As a machinelearning model a feed forward neural net was choosen.

The net consists of 2646 input nodes, two hidden layers (1000, 100 nodes) and one output layer comosed of one (output) node. Sigmoid activation functions where choosen, as all the input and output values are between 0 and 1. For details see model_a

For the creation of trainingdata the background of two of the images was manually removed.

Training Green Training Transp

Training Green Training Transp

Then an input dataset was created as described in the graphics below

Features Extract

a) The image.

b) The actual pixel containing the label represented by its transparency.

c) The feature box for the actual pixel

Features Extract

b) The actual pixel containing the label represented by its transparency.

c) The feature box for the actual pixel.

d) Delta. The maximal distance of features from the actual pixel.

The features are the RGB values of the pixels of the feature box

Results

Result Result

Result Result

Result Result

Result Result

Result Result

About

green screen image extractor using ai-methods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published