Skip to content

Latest commit

 

History

History
540 lines (508 loc) · 20.4 KB

README_EN.md

File metadata and controls

540 lines (508 loc) · 20.4 KB

[Japanese/English]

Image-Processing-Node-Editor

An application that performs image processing with the node editor.
It is used for processing verification and comparison.

Note

Since the nodes are added in the order in which the author(Takahashi) needs them,
There may be a shortage of nodes responsible for basic processing in image processing.

Requirement

opencv-python   4.5.5.64 or later
onnxruntime-gpu 1.11.1   or later
dearpygui       1.6.2    or later
mediapipe       0.8.10   or later ※Required to run mediapipe node
protobuf        3.20.0   or later ※Required to run mediapipe node
filterpy        1.4.5    or later ※Required to run MOT(motpy) node
lap             0.4.0    or later ※Required to run MOT(ByteTrack) node
Cython          0.29.30  or later ※Required to run MOT(ByteTrack) node
cython-bbox     0.1.3    or later ※Required to run MOT(ByteTrack) node
rich            12.4.4   or later ※Required to run MOT(Norfair) node

*If the installation of cython_bbox fails on Windows, please try the installation from GitHub (as of 2022/06/05).

pip install numpy
pip install Cython
pip install -e git+https://github.com/samson-wang/cython_bbox.git#egg=cython-bbox

Installation

Please prepare the environment by one of the following methods.

  • Run the script directly
    1. Clone repository
      git clone https://github.com/Kazuhito00/Image-Processing-Node-Editor
    2. Install package
      pip install -r requirements.txt
  • Use Docker
    1. See Image-Processing-Node-Editor/docker/nvidia-gpu
  • Use pip installation
    1. Specify the GitHub repository and pip install
      pip install git+https://github.com/Kazuhito00/Image-Processing-Node-Editor
    2. Start the application with the following command
      ipn-editor

Usage

Here's how to run the app.

python main.py
  • --setting
    Specifying the configuration file path that describes the node size and VideoWriter settings
    Default:node_editor/setting/setting.json
  • --unuse_async_draw
    Do not use asynchronous drawing
    →Perform GUI event loop and node update process in series
    *For investigating the cause of abnormal node termination, etc.
    Default:unspecified

Create Node

Select the node you want to create from the menu and click

Connect Node

Drag the output terminal to connect to the input terminal
Only the same type set for the terminal can be connected

Delete Node

With the node you want to delete selected, press the "Del" key

Export

Press "Export" from the menu and save the node settings(json file)

Import

Read the node settings(json file) output by Export

Node

Input Node
Image Node that reads still images (bmp, jpg, png, gif) and outputs images
Open the file dialog with the "Select Image" button
Video A node that reads a video (bmp, jpg, png, gif) and outputs an image for each frame
Open the file dialog with the "Select Movie" button
Check "Loop" to play the video in a loop
"Skip rate" sets the interval for skipping the output image.
WebCam A node that reads a webcam and outputs an image for each frame
Specify the camera number in the Device No drop-down list
Int Value Node that outputs an integer value
Int Value Node that outputs the float value
Process Node
ApplyColorMap A node that applies pseudo color to the input image and outputs a pseudo color image
Blur A node that executes smoothing processing on the input image and outputs the smoothed image
Brightness A node that executes brightness adjustment processing on the input image and outputs the brightness adjustment image
Brightness adjustment value can be changed with the "alpha" slide bar
Canny A node that executes edge detection processing using the Canny method on the input image and outputs the edge detection image.
Specify the minimum and maximum thresholds with the slider
Contrast A node that executes contrast adjustment processing on the input image and outputs the contrast adjustment image.
Contrast adjustment value can be changed with the "beta" slide bar
Crop A node that performs cropping of the input image and outputs the cropped image
Upper left coordinates(x1, y1) and upper right coordinates(x2, y2) can be changed with the slider
EqualizeHist Node that performs histogram flattening of the brightness part of the input image and outputs the image
Flip A node that performs horizontal/vertical inversion to the input image and outputs the image
Gamma Correction A node that performs gamma correction on the input image and outputs the image
Gamma value can be changed with the slider
Grayscale A node that grayscales the input image and outputs the image
Threshold A node that binarizes the input image and outputs the image
Specify the binarization algorithm with "type"
Change threshold with "threshold"

In "type", "Otsu binarization (THRESH_OTSU)" is an automatic threshold determination algorithm, so the "threshold" value is ignored.
Deep Learning Node

You can specify the model in the drop-down list and change the device at the time of inference with the CPU / GPU checkbox.

  • If the model does not support GPU inference, checking GPU will still result in CPU inference
    Refer to each directory of "node/deep_learning_node/XXXXXXXX" for the license of the model used by the node.
Classification Node that performs classification on the input image
The output image is a raw image

Performs classification on the bounding box when an Object Detection node is connected
Face Detection Node that performs face detection on the input image
The output image is a raw image
Low-Light Image Enhancement A node that performs Low-Light Image Enhancement on the input image
The output image is an image with Low-Light Image Enhancement applied.
Monocular Depth Estimation A node that performs monocular depth estimation on the input image
The output image is a grayscale image to which monocular depth estimation is applied.
Object Detection Node that performs object detection on the input image
The output image is a raw image
Pose Estimation Node that performs attitude estimation for the input image
The output image is a raw image
Semantic Segmentation A node that performs semantic segmentation on the input image
The output image is a raw image
Analysis Node
FPS A node that calculates FPS based on the processing time(ms) of the node
Processing time input terminal can be added with "Add Slot"
RGB Histgram Node that calculates the histogram of each RGB channel of the input image and displays it in the graph
Draw Node
Draw Information Draw the analysis result for the image of the node that outputs the raw image such as Classification node and Object Detection node.
Image Concat Node that displays multiple input images side by side
Image input terminal can be added with "Add Slot"
PutText A node that draws text in the upper left of the input image
Drawing color can be selected in the color map
By connecting the processing time input terminal, the processing time is also drawn.
Result Image Node to display the image
Display larger than the processing node
Also, if you connect a node that outputs raw images such as a Classification node or Object Detection node, the analysis result will be added and drawn.
Result Image(Large) Larger than the Result Image node
Other Node
ON/OFF Switch Node to switch whether to output the input image or not
Video Writer Node to export the input image as a video
Output destination, output size, FPS are specified in "setting.json"
Preview Release Node

Nodes whose specifications may change significantly in the future

MOT A node that inputs an Object Detection node and executes MOT(Multi Object Tracking)

ToDo

  • Investigating the problem that the graph part of the RGB Histgram node is always in the foreground
  • Investigating the problem that the connection line remains when deleting a node that connects multiple nodes
  • Improved behavior that the import feature can only be used before adding a node

Author

Kazuhito Takahashi(https://twitter.com/KzhtTkhs)

License

Image-Processing-Node-Editor is under Apache-2.0 license.

IThe source code of mage-Processing-Node-Editor itself is Apache-2.0 license, but
The source code for each algorithm is subject to its own license.
For details, please check the LICENSE file included in each directory.

License(Image)

The images displayed in the sample are borrowed from the Free Material Pakutaso,and NHK Creative Library.