This is the third demo of the OpenCV Deep Neural Network (dnn) module in Processing with my latest CVImage library. In this version, I used the Darknet YOLO v3 pre-trained model for object detection. It is based on the object_detection sample from the latest OpenCV distribution. The configuration and weights model files for the COCO datasets are also available in the Darknet website. In the data folder of the Processing sketch, you will have the following 3 files:
This is the 2nd test of the OpenCV dnn module in Processing through my CVImage library. It used the OpenPose pre-trained Caffe model.
Since the OpenCV dnn module can read the Caffe model through the readNetFromCaffe() function, the demo sends the real time webcam image to the model for human pose detection. It made use of the configuration file openpose_pose_coco.prototxt and the saved model pose_iter_440000.caffemodel. The original reference of the demo is from the openpose.cpp official OpenCV sample and the Java implementation from the GitHub of berak. You can download the model details below
This is my first demo run of the dnn (deep neural network) module in OpenCV 3.4.2 with Processing, using my CVImage library. The module can input pre-trained models from Caffe, Tensorflow, Darknet, and Torch. In this example, I used the Tensorflow model Inception v2 SSD COCO from here. I also obtained the label map file from the Tensorflow GitHub. The following 3 files are in the data folder of the Processing sketch.
The source code is in my GitHub repository of this website here.
After the release of OpenCV 3.4.2, I have prepared the pre-built version of the Java libraries for OSX, Ubuntu, and Windows 8.1 platforms (64 bits). In this release, there is more extensive support for the Java binding. I also packaged the library as the Processing library – CVImage. Please refer to latest book for details. In addition to the optflow contributed library, it also includes additional contributed libraries, such as bgsegm, face, and tracking.
In the former post, I have tested using the jCodec 0.1.5 and 0.2.0 to save the Processing screen into an MP4 file. The latest version of jCodec 0.2.3 has, however, changed its functions for the AWT based applications. Here is the new code for Processing to use jCodec 0.2.3 to save any BufferedImage to an external MP4 file.
To use the code, you need to download from the jCodec website the following two jar files and put them into the code folder of your Processing sketch.
The following code will write a frame of your Processing screen into the MP4 file for every mouse pressed action.
The new release of OpenCV 3.3 is out now. I again prepare the Java build for the CVImage Processing library use. It also includes the optflow extra module for motion history applications. Here is the list of the 3 OpenCV releases.