All Projects → DDemmer1 → ai-background-remove

DDemmer1 / ai-background-remove

Licence: other
Cut out objects and remove backgrounds from pictures with artificial intelligence

Projects that are alternatives of or similar to ai-background-remove

django bgRemoverML
A Machine Learning Project integrated with Django to Remove Background from Image .
Stars: ✭ 136 (+94.29%)
Mutual labels:  background-subtraction, background-removal
EmbeddedML
EmbeddedML was created to be an alternative to the limited options available for Artificial Neural Networks in C. It is designed to be efficient without sacrificing ease of use. It is meant to support students as well as industry experts as it is built to be expandable and straightforward to manipulate.
Stars: ✭ 24 (-65.71%)
Mutual labels:  ml, artificial-neural-networks
r2inference
RidgeRun Inference Framework
Stars: ✭ 22 (-68.57%)
Mutual labels:  ml, artificial-neural-networks
mildnet
Visual Similarity research at Fynd. Contains code to reproduce 2 of our research papers.
Stars: ✭ 76 (+8.57%)
Mutual labels:  ml
CS-7641-assignments
CS 7641 - All the code
Stars: ✭ 135 (+92.86%)
Mutual labels:  ml
k3ai-core
K3ai-core is the core library for the GO installer. Go installer will replace the current bash installer
Stars: ✭ 23 (-67.14%)
Mutual labels:  ml
ML-For-Beginners
12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all
Stars: ✭ 40,023 (+57075.71%)
Mutual labels:  ml
wargames
two soldiers shooting at each other, controlled by a neural network with a genetic algorithm.
Stars: ✭ 22 (-68.57%)
Mutual labels:  artificial-neural-networks
ml-lpi
Materials for ML course at Lebedev Physical Institute
Stars: ✭ 31 (-55.71%)
Mutual labels:  ml
DA-RetinaNet
Official Detectron2 implementation of DA-RetinaNet of our Image and Vision Computing 2021 work 'An unsupervised domain adaptation scheme for single-stage artwork recognition in cultural sites'
Stars: ✭ 31 (-55.71%)
Mutual labels:  detectron2
ScaledYOLOv4
Scaled-YOLOv4: Scaling Cross Stage Partial Network
Stars: ✭ 1,944 (+2677.14%)
Mutual labels:  ml
TFLite-Android-Helper
TensorFlow Lite Helper for Android to help getting started with TesnorFlow.
Stars: ✭ 25 (-64.29%)
Mutual labels:  ml
DDOS Detection
ddos attack detector using ML Algorithms
Stars: ✭ 38 (-45.71%)
Mutual labels:  ml
flor
FLOR: Fast Low-Overhead Recovery. FLOR lets you log ML training data post-hoc, with hindsight.
Stars: ✭ 123 (+75.71%)
Mutual labels:  ml
YOLOv4MLNet
Use the YOLO v4 and v5 (ONNX) models for object detection in C# using ML.Net
Stars: ✭ 61 (-12.86%)
Mutual labels:  ml
kglib
TypeDB-ML is the Machine Learning integrations library for TypeDB
Stars: ✭ 523 (+647.14%)
Mutual labels:  ml
EVHS-Programming-Club
The public GitHub repo for the EVHS Programming Club
Stars: ✭ 16 (-77.14%)
Mutual labels:  ml
incubator-liminal
Apache Liminals goal is to operationalise the machine learning process, allowing data scientists to quickly transition from a successful experiment to an automated pipeline of model training, validation, deployment and inference in production. Liminal provides a Domain Specific Language to build ML workflows on top of Apache Airflow.
Stars: ✭ 117 (+67.14%)
Mutual labels:  ml
ai-backpropagation
The backpropagation algorithm explained and demonstrated.
Stars: ✭ 20 (-71.43%)
Mutual labels:  artificial-neural-networks
gan-vae-pretrained-pytorch
Pretrained GANs + VAEs + classifiers for MNIST/CIFAR in pytorch.
Stars: ✭ 134 (+91.43%)
Mutual labels:  ml

Remove backgrounds and cut out objects from pictures with AI

This works by first detecting objects with Detectron2 , then cutting out the desired masks with openCV and cropping out the object to its bounding boxes.

Detectron2 is Facebook AI Research's next generation software system that implements state-of-the-art object detection algorithms. There is no GPU required if you use pretrained models

List of currently supported objects

The extracted objects are not cut out pixel-perfect, but it can be a tremendous workload reduction to be able to process thousands of images at once. For example as a data set for other ML applications.

Installation

-1. Installing Detectron2 on Linux systems is pretty straightforward.

For Windows 10, a relatively easy solution is to install the Windows subsystem for Linux, instructions here: https://docs.microsoft.com/en-us/windows/wsl/install-win10. You will have to install the following packages as well (in the shell): python, python-dev and opencv-python.

For OS X, you can try to follow the Anaconda instructions posted here: https://medium.com/deepvisionguru/how-to-embed-detectron2-in-your-computer-vision-project-817f29149461. Please note that this is not yet compatible with our demo.py script, we hope to fix that soon.

  1. Clone this repository and enter folder (or download, extract and enter folder):
git clone https://github.com/DDemmer1/ai-background-remove.git
cd ai-background-remove
  1. Create virtual environment to make sure we don't mess with your system python install and install all needed packages:

If you have a Conda python install, try this:

conda create --nsame detectron2
conda activate detectron2

For vanilla python, try this:

python -m venv detectron2
source detectron2/bin/activate
pip install -r detectron2/requirements.txt
  1. Install precompiled Detectron2 with CPU support only:
pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/index.html

OR: Install precompiled Detectron2 for CUDA 10.1:

pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/index.html
  1. Create a new Jupyter kernel which uses the virtual environment you have just created:
ipython kernel install --user --name=detectron2

Run the pretrained model

  1. Copy your images with the objects to extract to ai-background-remove/input

  2. Run the following network: (If you use a Python version other than 3.7. Make sure to change the version in the path )

python detectron2/demo.py --config-file detectron2/lib/python3.7/site-packages/detectron2/model_zoo/configs/COCO-PanopticSegmentation/panoptic_fpn_R_101_3x.yaml --input input/* --output output  --opts MODEL.DEVICE cpu MODEL.WEIGHTS detectron2://COCO-PanopticSegmentation/panoptic_fpn_R_101_3x/139514519/model_final_cafdb1.pkl
  1. Detected objects are marked and a visualization is saved in your /output folder.

Object Extraction

Run Jupyter notebook

jupyter notebook

For background removal open bg-remove.ipynb and make sure the 'detectron2' kernel is used and run the cells

If you want to instead analyse your input corpus open deep_watching.ipynb and run the cells (make sure the 'detectron2' kernel is used)

If you want to know how to label pictures and train your own networks have a look at https://github.com/ghowa/dhd2020

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].