Skip to content

📷 Image to WhiteBoard Sketch Animation Video Generation

Simply upload your image and see the magic after clicking the Submit button. This do not require any fancy pre-trained AI models. This one uses NumPy and OpenCV to do the job. You can visit my website daslearning.in for more topics.

📽️ Demo

You can play below Video or click this Youtube Link to see the demo. Please let me know in the comments, how do you feel about this App.

⚒️ Automatic Installation

git clone https://github.com/daslearning-org/ai-img2sketch.git
cd ai-img2sketch
pip install -r requirements.txt

⚒️ Manual Installation

git clone https://github.com/daslearning-org/ai-img2sketch.git
cd ai-img2sketch
python -m venv .env
source .env/bin/activate # Optional if you do not want virtual environment
pip install numpy
pip install opencv-python
pip install gradio

🤖 Known Issues

  1. Video codec mp4v might not be compatible with browser or some video players (The default codec of this app) > Fixes (Tested on Debian based Linux only): The gradio's video module will try to use ffmpeg to convert the video automatically.
    # Install FFMPEG related packages
    sudo apt update
    sudo apt install ffmpeg libavformat-dev libavcodec-dev libswscale-dev -y
    

▶️ Run the App

python img2SketchUI.py

📝 Next Plan

  • Add a feature to turn normal colour photo into black-&-white or a sketch style photo which will be added into the video (instead os using the original colour photo).
  • Users can manually change the required video resolution (current one does the best by taking the most suitable resolution for a given image).

🙏🏻 Acknowledgements

  • I would like to thank Yogendra Yatnalkar for solving the complex math on images and sharing the python code.