Code Monkey home page Code Monkey logo

face-detect-processor's Introduction

Face Detection for DreamBooth

This Python script is designed to process images, detect faces, and crop them for use with DreamBooth.

Usage

  1. Place the images you want to process in the input folder.
  2. Run the script main.py.
  3. Processed images with detected faces will be saved in the output folder.

The script supports the following file types for image processing:

  • .jpg
  • .jpeg
  • .png
  • .bmp
  • .heic

Requirements

  • Python 3.x
  • OpenCV (cv2)
  • Pillow
  • pyheif

Setup Steps

  1. Clone git repo.
git clone https://github.com/brndnsmth/face-detect-processor.git
cd face-detect-processor
  1. Create a Virtual Environment: Utilize Python 3 to create a virtual environment for this project. This step ensures a clean and isolated environment for installing dependencies.
python3 -m venv .venv
  1. Activate the Virtual Environment: Activate the virtual environment to isolate the project dependencies from other Python installations on your system.
source .venv/bin/activate
  1. Install Dependencies: While inside the virtual environment, install the required dependencies specified in the requirements.txt file using pip.
pip install -r requirements.txt
  1. Add Images: Create input folder and add images to directory.
mkdir input
  1. Run the Script: Execute the following command to run the script:
python main.py
  1. Check Output: Check processed images. Adjust the following in main.py, as needed:
scaleFactor=1.05, minNeighbors=6, minSize=(100, 100)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.