Skip to content

Image Processing Tasks

Don Kackman edited this page Jan 5, 2025 · 4 revisions

Image Processing Documentation

These are the image tasks that can be used as pre and post processors.

Tasks

add_border_and_mask

  • Description: Adds a border and mask to the image. Used for outpainting
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for border and mask customization.

anyline

  • Description: Applies Anyline detection.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for Anyline detection.

canny

  • Description: Applies Canny edge detection.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for Canny edge detection.

canny_cv

  • Description: Applies Canny edge detection using OpenCV.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for Canny edge detection.

crop_sqaure

  • Description: Crops the image to a square.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for cropping.

depth

  • Description: Converts the image to a depth map.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for depth conversion.

depth_estimator

  • Description: Generates a depth hint image from the image.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.

depth_estimator_tensor

  • Description: Generates a depth hint tensor from the image.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.

dw_pose

  • Description: Detects poses using the DWpose model.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for pose detection.

face_detector

  • Description: Detects faces in the image.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for face detection.

get_image_size

  • Description: Returns the dimensions of the image.
  • Arguments:
    • image: The input image.

hed

  • Description: Applies Holistically-Nested Edge Detection (HED).
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for HED customization.

leres

  • Description: Applies LeReS (Learning to Restore) for depth estimation.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for LeReS.

lineart

  • Description: Converts the image to line art.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for line art customization.

lineart_standard

  • Description: Converts the image to standard line art.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for line art conversion.

midas

  • Description: Estimates depth using the MiDaS model.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for depth estimation.

mlsd

  • Description: Applies MLSD (Multi-Line Segment Detector) to the image.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for MLSD customization.

normal_bae

  • Description: Applies Normal BAE (Boundary Aware Edge) detection.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for Normal BAE customization.

openpose

  • Description: Detects human poses in the image.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for pose detection.

pidi

  • Description: Applies PidiNet edge detection.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for PidiNet customization.

remove_background

  • Description: Removes the background from the image.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for background removal customization.

resize_center_crop

  • Description: Resizes and center crops the image.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for resizing and cropping.

resize_rescale

  • Description: Resizes and rescales the image.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for resizing and rescaling.

resize_resample

  • Description: Resizes the image with resampling.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for resizing.

sam

  • Description: Applies the SAM (Segment Anything Model) for segmentation.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for SAM.

scribble

  • Description: Applies HED with scribble mode enabled.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for scribble mode.

segmentation

  • Description: Segments the image into different regions.
  • Arguments:
    • image: The input image.

shuffle

  • Description: Applies content shuffling to the image.
  • Arguments:
    • image: The input image.
    • kwargs: Additional keyword arguments for content shuffling.

teed

  • Description: Applies TEED (Transformer-based Edge Detection).
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for TEED.

zoe

  • Description: Applies the Zoe model for depth estimation.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.
    • kwargs: Additional keyword arguments for Zoe model.

zoe_depth

  • Description: Generates a depth map using the Zoe model.
  • Arguments:
    • image: The input image.
    • device_identifier: The device to perform the operation on.

Notes

  • Each processor may have specific requirements for the input image format and additional arguments. Ensure that the image and arguments are compatible with the processor being used.
  • The device_identifier is typically used to specify the hardware (e.g., CPU or GPU) on which the processing should be performed.

Clone this wiki locally