Welcome to Software Laboratory of Antillia.com.
    Future Windows and Linux Programming

  SOL4Py Class Library

  Home     SOL4Py Class List     SOL4Py Samples  

1 What is SOL4Py
1.1 SOL4Py
SOL4Py is a tiny Python class library for Python, PyQt, OpenCV, and ML.
The basic class design of SOL4Py is tflowd on that of our SOL9 C++ library. In order to develop our library, we have used the latest Python3.6, PyQt5, and OpenCV-4.0.1 on Windows 10 April 2018 Update environment. We have tested the sample programs on Windows 10 only, but you may run them on Linux environment too, provided you install required Python, PyQt, OpenCV modules on Linux.

On installation of PyQt5, please see the site Installing PyQt5

To develop SOL4Py library, we created an environment tflow for tensorflow and installed the following libraries on Anaconda3(64-bit) Prompt of April 2018 Update Windows10.

(base) C:\sol4>conda create -yn tflow tensorflow
(base) C:\sol4>activate tflow

(tflow) C:\sol4>conda install PyQt5
(tflow) C:\sol4>conda install pandas
(tflow) C:\sol4>conda install matplotlib
(tflow) C:\sol4>conda install seaborn
(tflow) C:\sol4>conda install pydotplus
(tflow) C:\sol4>conda install -c conda-forge qimage2ndarray
(tflow) C:\sol4>conda install sklearn
(tflow) C:\sol4>conda install -c anaconda py-xgboost
(tflow) C:\sol4>conda install LightGBM
(tflow) C:\sol4>conda install tensorflow
(tflow) C:\sol4>conda install keras
(tflow) C:\sol4>conda install cx_Oracle
(tflow) C:\sol4>conda install pydot (tflow) C:\sol4>conda install PyOpenGL
(tflow) C:\sol4>conda install graphviz

Since the opencv-python package (OpenCV- has a problem on cv2.drawKeypoint, we have installled Unofficial Windows Binaries for Python Extension Packages: opencv_python-4.0.1 package in the following way:

(tflow) C:\sol4>pip install C:\Downloads\opencv_python-4.0.1-cp36-cp36m-win_amd64.whl

As you can easily identify, we have been using Python version 3.6.6

python -c "import sys; print(sys.version)"

, Tensorflow 1.13.1, Keras 2.2.4, OpenCV-4.0.1 and OpenGL 3.1.1a1. You can easily check their versions in the following way.

python -c "import tensorflow as tf; print(tf.__version__)"
python -c "import keras; print(keras.__version__)"
python -c "import cv2; print(cv2.__version__)"
python -c "import OpenGL as gl; print(gl.__version__)"

Furthermore, to connect Oracle12C Datatflow server from Python, we have been using cx_Oracle 7.0.0.

(tflow) python -c "import cx_Oracle; print(cx_Oracle.__version__)"

We have downloaded keras-yolo3, which is a python binding of YOLO: Real-Time Object Detection, and built a runtime-environment keras-yolo3 under SOL4Py-2 folder.

See a sample program YoloObjectDetector to detect objects in an image.

1.2 Download SOL4Py Library

Download: SOL4Py-2.4 Class Library for Python (Library & Samples) #2019.05.22)

2 How to use SOL4Py

2.1 Basic User Interface samples
2.1.1 How to use ZApplicationView?

2.1.2 How to use ZImageView?

2.1.3 How to use ZLabeledComboBox?

2.1.4 How to use ZLabeledSlider?

2.1.5 How to use ZScrolledImageView?

2.1.6 How to use ZColorPositioner?

2.1.7 How to use FolderBrowser?

2.1.8 How to use TabbedWindow?

2.2 OpenCV samples
2.2.1 How to use ZOpenCVImageView?

2.2.2 How to use cv2.boxFilter?

2.2.3 How to use cv2.adaptiveThreshold?

4.2.4 How to use cv2.AKAZE feature detector?

2.2.5 How to use cv2.createStitcher?

2.2.6 How to use cv2.GaussianBlur and cv2.addWeighted?

2.2.7 How to use cv2.getStructuringElement and cv2.morphologyEx?

2.2.8 How to use cv2.FlannBasedMatcher?

2.2.9 How to use cv2.edgePreservingFilter, cv2.detailEnhance and cv2.pencilSketch?

2.2.10 How to use cv2.CascadeClassifier to detect faces?

2.2.11 How to use cv2.HOGDescriptor to detect pedestrians?

2.2.12 How to use cv2.VideoCapture to display video files?

2.2.13 How to use a scrolled plotting area to draw a figure of matplotlib and seaborn?

2.2.14 How to inject the Gaussian noise to an image of OpenCV?

2.3 CNN samples
2.3.1 How to use CIFAR-10 and CIFAR-100 datasets on cnn model for image classification?

2.3.2 How to use MNIST and FashionMNIS datasets on cnn model for image classification?

2.3.2 How to use VGG16 cnn model for image classification?

2.3.2 How to use inception-v3 cnn model for image classification?

2.4 ML samples
2.4.1 How to use DecisionTreeClassifier?

2.4.2 How to use LightGBMClassifiers?

2.4.3 How to use RandomForestRegressor?

2.4.4 How to use XGBClassifier?

2.5 Socket samples
2.5.1 How to use CustomThreadedTCPServer?

2.5.2 How to use CustomThreadedUDPServer?

2.5.3 How to use CustomThreadingMixInTCPServer.html?

2.5.4 How to use CustomThreadingMixInUDPServer?

2.5.5 How to use NonblockingTCPServerThread?

2.6 Oracle12C samples
2.6.1 How to insert data into a table of Oracle12C?

2.6.2 How to select records from a table of Oracle12C ?

2.7 OpenGL samples
2.7.1 How to render a colored pyramid in OpenGL?

2.7.2 How to rotate a cube by timer thread in OpenGL?

2.7.3 How to rotate multiple materialized toruses in OpenGL?

2.7.4 How to rotate a multiple jpg textured cubes in OpenGL?

2.7.5 How to map a texture in OpenGL?

2.7.6 How to rotate a textured sphere in OpenGL?

2.7.7 How to use axis-eye-light-positioner to render a textured sphere in OpenGL?

2.7.8 How to render a buffered colored regular icosahedron in OpenGL?

2.7.9 How to render a cube textured by OpenCV-NonPhotorealistic images in OpenGL?

2.7.10 How to show OpenGLView and OpenCVView on a window in SOL4Py?

2.8.1 How to preview images generated by Keras ImageDataGenerator?

2.8.2 How to create an image classifier for your image data by using CNN?

2.8.3 How to visualize training accuracy and loss in Keras Model fitting process by using matplotlib?

2.8.4 How to derive MNISTDenoisingAutoEncoder class from MNISTAutoEndoder?

2.8.5 How to create PictogramClassifier to TOKYO2020-SPORT-PICTOGRAMS by using Keras ImageDataGenerator?

2.8.6 How to apply Keras AutoEncoder to color images of VegeFruits dataset?

3.1 How to use yolo3 in Keras to detect objects in an image?

3.2 How to derive CustomYoloObjectDetector class from YOLO class to display detailed information detected ?

4.1 How to create LogWriter(ZLogger) class to write a string of format of [datetime, log-level, filename, line-no, function, message] to multiple streams?

 Last modified: 22 May 2019

Copyright (c) 2018-2019 Antillia.com ALL RIGHTS RESERVED.