AidLearning 支持用Python2/3来可视化开发您的App,内置了最为流行的深度学习框架caffe,mxnet,keras,pytoch,tensorflow,ncnn,opencv,scipy…内置了可视化AI开发编辑器,支持触摸拖拽式界面设计,支持代码动态调试和运行。支持在移动端和PC端用python开发你的AI应用,支持把你的python源码转化为APP(Apk)发布。
支持的包和框架:
python2支持:
absl-py==0.7.0
altgraph==0.16.1
appdirs==1.4.3
astor==0.7.1
backports.shutil-get-terminal-size==1.0.0
backports.weakref==1.0.post1
caffe==1.0.0
certifi==2018.11.29
chardet==3.0.4
Click==7.0
colorama==0.4.1
configobj==5.0.6
cryptography==1.7.1
cycler==0.10.0
Cython==0.25.2
decorator==4.0.11
dis3==0.1.3
easydict==1.9
EditOnline==0.1.14
enum34==1.1.6
Flask==1.0.2
funcsigs==1.0.2
functools32==3.2.3.post2
futures==3.2.0
gast==0.2.2
graphviz==0.10.1
grpcio==1.18.0
h5py==2.9.0
idna==2.8
imutils==0.5.2
ipaddress==1.0.17
ipython==5.8.0
ipython-genutils==0.2.0
itsdangerous==1.1.0
Jinja2==2.10
Keras==2.2.4
Keras-Applications==1.0.7
Keras-Preprocessing==1.0.9
keyring==10.1
keyrings.alt==1.3
Markdown==3.0.1
MarkupSafe==1.1.1
matplotlib==2.0.0
mock==2.0.0
mxnet==1.0.0
networkx==1.11
nose==1.3.7
numpy==1.14.5
pathlib2==2.3.3
pbr==5.1.2
pexpect==4.2.1
pickleshare==0.7.5
Pillow==4.0.0
prompt-toolkit==1.0.15
protobuf==3.6.1
ptyprocess==0.5.1
pyasn1==0.1.9
pycrypto==2.6.1
Pygments==2.3.1
pygobject==3.22.0
PyInstaller==3.5
pyobfuscate==0.3
pyparsing==2.1.10
Pyste==0.9.10
python-dateutil==2.5.3
python-for-android==0.7.0
pytz==2016.7
pywebview==2.4
pyxdg==0.25
PyYAML==3.12
remi==2019.4
requests==2.21.0
scandir==1.10.0
scikit-image==0.12.3
scikit-learn==0.20.3
scipy==0.18.1
SecretStorage==2.3.1
sh==1.12.14
simplegeneric==0.8.1
six==1.10.0
sklearn==0.0
subprocess32==3.2.7
tensorboard==1.10.0
tensorflow==1.10.0
termcolor==1.1.0
traitlets==4.3.2
urllib3==1.24.1
wcwidth==0.1.7
Werkzeug==0.14.1
python3支持:
absl-py==0.7.1
altgraph==0.16.1
astor==0.8.0
attrs==19.3.0
backcall==0.1.0
bleach==1.5.0
caffe==1.0.0
certifi==2019.3.9
chardet==3.0.4
Click==7.0
cycler==0.10.0
Cython==0.29.7
decorator==4.4.0
defusedxml==0.6.0
entrypoints==0.3
Flask==1.0.3
gast==0.2.2
gluoncv==0.4.0.post0
grpcio==1.20.1
h5py==2.9.0.post0
html5lib==0.9999999
htmlPy==2.0.3
idna==2.8
imageio==2.5.0
importlib-metadata==1.3.0
ipykernel==5.1.3
ipython==7.5.0
ipython-genutils==0.2.0
ipywidgets==7.5.1
itsdangerous==1.1.0
jedi==0.13.3
Jinja2==2.10.1
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==5.3.4
jupyter-console==6.0.0
jupyter-core==4.6.1
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.0.9
kiwisolver==1.1.0
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==3.1.0
mistune==0.8.4
more-itertools==8.0.2
mxnet==1.5.0
nbconvert==5.6.1
nbformat==4.4.0
networkx==2.3
nose==1.3.7
notebook==6.0.2
numpy==1.16.3
pandas==0.24.2
pandocfilters==1.4.2
parso==0.4.0
pexpect==4.7.0
pickleshare==0.7.5
Pillow==6.0.0
prometheus-client==0.7.1
prompt-toolkit==2.0.9
protobuf==3.7.1
psutil==5.6.3
ptyprocess==0.6.0
pydot==1.4.1
Pygments==2.4.0
PyInstaller==3.5
pyparsing==2.4.0
pyrsistent==0.15.6
python-dateutil==2.8.0
python-gflags==3.1.2
pytz==2019.1
PyWavelets==1.0.3
PyYAML==5.1
pyzmq==18.1.1
qtconsole==4.6.0
remi==2019.4
requests==2.22.0
scikit-image==0.15.0
scipy==1.3.0
Send2Trash==1.5.0
six==1.12.0
tensorboard==1.8.0
tensorflow==1.5.0
tensorflow-tensorboard==1.5.1
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
torch==1.1.0a0+6b74856
tornado==6.0.3
tqdm==4.32.1
traitlets==4.3.2
urllib3==1.25.3
wcwidth==0.1.7
Werkzeug==0.15.4
widgetsnbextension==3.5.1
zipp==0.6.0
支持的AI框架版本
AidLearning | Python2.7 | Python3.6 |
---|---|---|
caffe | ✓1.0.0 | ✓ 1.0.0 |
mxnet | ✓1.0.0 | ✓1.5.0 |
tensorflow | ✓1.10.0 | ✓1.5.0 |
Gluoncv | ✗ | ✓ 0.40 |
Keras | ✓2.2.4 | ✓2.2.4 |
Pytorch | ✗ | ✓1.1.0 |
Opencv(cv2) | ✓2.4.9 | ✓3.4.6 |
Scipy | ✓0.18.1 | ✓1.3.0 |
Numpy | ✓1.14.5 | ✓1.16.3 |
图形界面开发包cvs
我们重写了cvs包用来在手机端对gui的显示和设计,同时cvs继承了cv2(opencv for python)包和remi(python的跨平台的gui库)包的大部分功能,以下是cvs包的介绍:
怎么使用:
包里有什么
函数名和变量 | 继承 | 参数 | 作用 | 返回 |
---|---|---|---|---|
imread | cv2 | same as cv2 | 读一张图 | mat图片数据 |
read | cv2 | same as cv2 | 读一帧图 | mat图像数据 |
imshow | cv2 | same as cv2 | 显示图片 | |
VideoCapture | cv2 | same as cv2 | 打开摄像头 | 返回cam |
openwin | custom | 无 | 打开一个窗体 | 无 |
rectangle | cv2 | same as cv2 | 画矩形 | 无 |
line | cv2 | same as cv2 | 画直线 | 无 |
circle | cv2 | same as cv2 | 画椭圆 | 无 |
putText | cv2 | same as cv2 | 在图像上写字 | 无 |
GaussianBlur | cv2 | same as cv2 | 高斯模糊 | mat图像数据 |
flip | cv2 | same as cv2 | 图像反转 | mat图像数据 |
resize | cv2 | same as cv2 | 缩放图像尺寸 | mat图像数据 |
setLbs | custom | str | 传递str参数 | 无 |
getLbs | custom | 无 | 传递str参数 | str |
waitKey | cv2 | same as cv2 | 等待延迟 | 无 |
sleep | custom | 毫秒数 | 等待延迟 | 无 |
initcv | custom | 函数名 | 初始化处理线程 | 无 |
startcv | remi | gui的类名 | 启动gui界面 | 无 |
App | remi | — | 用于ui设计和显示 | 无 |
gui | remi | — | ui控件类 | 无 |
简短教程:
首先,导入cvs包
from cvs import *
其次,定义一个子类继承“app”类,并声明一个“main”函数,该函数将成为应用程序的入口点。在主函数内部,您必须return
the root widget。
Subclass the App
class and declare a main
function that will be the entry point of the application. Inside the main function you have to return
the root widget.
class MyApp(App):
def init(self, args):
super(MyApp, self).init(args)
def main(self):<br /> lbl = gui.Label("Hello world!", width=100, height=30)
# return of the root widget<br /> return lbl
最后,在主类之外,调用initcv(cvs.openwin)初始化窗口,调用函数“startcv”启动应用程序,并将前面声明的类的名称作为参数传递。
Outside the main class start the application calling the function startcv
passing as parameter the name of the class you declared previously.
# starts the gui
initcv(cvs.openwin)
startcv(MyApp)
Run the script,显示如下:
更多界面开发参考:github(https://github.com/aidlearning/AidLearning-FrameWork/blob/master/gui_cvs/README.md)