Copy and Paste to PowerPoint with AI

I was inspired by the idea of AR Copy Paste to build the app to cut and paste the object to PowerPoint and to mention is without AR :)

This app can only be run in Windows system. I have tested on Windows 10 Enterprise 64 Bit with PowerPoint for Office 365 MSO 64 Bit.

There are three major modules we will build:

  • The Background Removal Server
  • The Local Server
  • The PPT Server
  • An UI App

Most of the codes here are taken from with little modification to meet our needs.

The Background Removal Server

The background removal server is responsible to remove the background image.

Download basnet.pth from and copy to BASNet/saved_models/basnet_bsi:

Setup the server by executing the following commands:

virtualenv -p python3.7 venv
source venv/bin/activate
pip install -r requirements.txt

Run the server:


The Local Server

The local server is responsible to preprocess and postprocess the image. Setup the local server by executing the following commands:

virtualenv -p python3.7 venv
source venv/bin/activate
pip install -r requirements.txt

Replace the basnet_service_ip with the background removal server IP address and run the server:

python \

The PPT Server

This server is responsible to send the image to the local server and get the result from there and copy the image to the clipboard using PowerShell script. I tried with Python win32clipboard, but unable to maintain the image (PNG) transparency.

Run the server with the below command:

node server.js <http_address_of_local_server>example:
node server.js http://X.X.X.X

Take note that the temporary image file result.png is created and follow by executing the PowerShell script fcopy.bat to copy the image to Clipboard. This is the trick that I have done to maintain the transparency while copying the PNG image to clipboard. Any better idea, please drop in the comment.

An UI App

An UI app is responsible to capture the image and send it via a Socket.IO to the PPT server. Since I don’t have any experience in ReactJS or other sophisticated UI development, I created the UI based on the SAPUI5. Any development on UI is more than welcome and appreciate.

UI app based on SAPUI5

Edit /controller/Home.controller.js and replace http_ip_addr_of_PPT_server with the PPT Server IP address.

socket = io('<http_ip_addr_of_PPT_server>', { transport : [‘websocket’] });

Host the app in a simple web server like Apache and run it in the browser:


Demo Video





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Introduction to Melos Metis AI Workshop Whitelist Beta Testers

40 web development tools you must know about in 2020

Programming Language Anthems: What Could They Sound Like?

Three Unexpected Benefits of Career Development Tracks in Engineering

How to validate a RAR file in C# .Net Framework

If Programming Languages Were Disney Characters

How to Generate an EAN-13 Barcode as a PNG File


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ferry Djaja

Ferry Djaja

More from Medium

Introducing Reproducibility Reviews

AI: Rule Based & ML Based

Kids just have their own language

Jigsaw Rating Comment Toxicity