EasyOCR_choose Node Documentation
Overview
The EasyOCR_choose node is designed to perform Optical Character Recognition (OCR) on images within the ComfyUI framework. This node uses the EasyOCR library to detect and extract text from images, supporting a wide array of languages. It is ideal for users who need to integrate text recognition capabilities into their image processing workflows.
Functionality
- OCR Processing: Recognizes and extracts text from input images using specified language settings.
- Image Annotation: Draws bounding boxes around detected text areas in the input image.
- Multi-Language Support: Supports multiple languages for text detection, allowing users to choose their preferred language for OCR.
Inputs
The EasyOCR_choose node accepts the following inputs:
- Image: Accepts an image input which serves as the source for OCR processing.
- GPU: A boolean toggle to enable or disable GPU acceleration for OCR processing. By default, it is enabled.
- Language List: Provides a selection menu of supported languages for OCR. This allows users to specify the language(s) of the text they expect to find in the images. Default is set to "English".
- Is Enable: A boolean input that enables or disables the OCR processing. If set to False, the node will not perform OCR.
Outputs
The EasyOCR_choose node produces the following outputs:
- Images: The original image annotated with bounding boxes around detected text.
- Masks: A mask image highlighting the areas where text was detected.
- JSON String: A JSON-formatted string containing details about the detected text, including bounding box coordinates, recognized text, and confidence scores.
- Text: A simple extraction of the recognized text without detailed data like bounding boxes.
Usage in ComfyUI Workflows
In ComfyUI workflows, the EasyOCR_choose node can be used in various scenarios that require text extraction from images:
- Document Processing: Automate reading and extracting text data from scanned documents or photos of documents.
- Image Annotation: Use the node to annotate images with detected text areas, useful for creating training data or visual verification of OCR accuracy.
- Multi-language Applications: Implement in applications requiring OCR with support for multiple languages, enhancing global usability.
Special Features and Considerations
-
Language Support: The node supports an extensive list of languages, making it suitable for diverse international applications. Users select languages from a predefined list.
-
Performance Considerations: Utilizing GPU acceleration can significantly enhance OCR processing speed, especially beneficial for large images or batch processing. Ensure that the system's GPU is supported and configured correctly when this option is enabled.
-
Toggle Processing: The 'Is Enable' input acts as a safeguard against unnecessary processing, allowing users to quickly bypass the node when OCR is not needed.
-
Integration Flexibility: The annotated outputs (images and masks) can be further processed within the ComfyUI for tasks like image presentation, filtering, or analysis.
The EasyOCR_choose node provides a robust OCR solution within the ComfyUI ecosystem, catering to users who require accurate and efficient text extraction from images. Its support for numerous languages and ease of integration make it an essential component for workflows dealing with textual data in images.