Gargantua Detector Cropper

Details

Download Files

Model description

Hello have you ever needed to crop features from a large batch of images and save for example only faces, feets, breasts? this simple code help you do very easily using ADetailer models to Detect the features and crop them!

Just Download this Folder, unzip it and add Adetailer .pt YOLO models (Available from CIVITAI) to the Models Folder and you are ready to go!

You need to have python and pip installed, all dependecies should install automatically at first run!

  1. Launch the Application:

    • Run the script to start the Gradio interface. This will open a web interface in your browser.

    • $ python GDC.py

    • in the browser go to http://127.0.0.1:7860/

  2. Select a Model:

    • In the "Select Model" dropdown, choose a YOLO model from the list provided. These models should be located in the "Models" folder.
  3. Single Image Processing:

    • Upload an Image:

      • Click on the "Input Image" area to upload an image file you want to process.
    • Adjust Parameters:

      • Use the "Scale Factor" slider to set the scale factor for cropping.

      • Use the "Confidence Threshold" slider to set the confidence threshold for face detection.

    • Process the Image:

      • Click the "Process Single Image" button.

      • The processed image will be displayed in the "Output Image" area.

      • The output text will show details about the detection.

  4. Batch Processing:

    • Specify Folders:

      • Enter the path of the folder containing the images you want to process in the "Input Folder" textbox.

      • Enter the path of the folder where you want to save the cropped images in the "Output Folder" textbox.

    • Adjust Parameters:

      • Use the "Scale Factor" slider to set the scale factor for cropping.

      • Use the "Confidence Threshold" slider to set the confidence threshold for face detection.

    • Batch Process Images:

      • Click the "Batch Process Images" button.

      • The results of the batch processing will be displayed in the "Batch Processing Output" textbox.

Example Usage:

  1. Single Image Processing:

    • Upload test.jpg as your input image.

    • Select face_model.pt as your model.

    • Set the "Scale Factor" to 1.5.

    • Set the "Confidence Threshold" to 0.5.

    • Click the "Process Single Image" button.

  2. Batch Processing:

    • Enter ./input_images as the "Input Folder".

    • Enter ./output_images as the "Output Folder".

    • Select face_model.pt as your model.

    • Set the "Scale Factor" to 1.5.

    • Set the "Confidence Threshold" to 0.5.

    • Click the "Batch Process Images" button.

By following these steps, you should be able to process both single images and batches of images with the face detection and cropping application.

Images made by this model

No Images Found.