OpenEBS-For-MinIO

Architecture

November 24, 2020 · 1 min · alexchen

Automate Analyse Covid 19 XRay Image by DeepLearning

The animation program code is as follows: lung-3D.nb lung3d = AnatomyPlot3D[lung anatomical structure, PlotTheme->"XRay"] gif = {}; Do[ image = ImageResize[ Show[lung3d, ViewPoint -> {3 Cos[x], 3 Sin[x], 0}, ViewAngle -> 20 Degree], {256, 256}]; gif = Append[gif, image], {x, 0, 2 Pi, 0.1}] Export["lung-3D.gif", gif, "AnimationRepetitions" -> Infinity ] image = ImageResize[ Show[lung3d, ViewPoint -> {3 Cos[Pi/2], 3 Sin[Pi/2], 0}, ViewAngle -> 20 Degree], {512, 512}] Training datasets covid-chestxray-dataset ...

July 13, 2020 · 19 min · alexchen

TF-MPI-Distributed-Training

Horovod I have written an article about how to build a distributed training cluster on Raspberry Pie 4 using the distributed training system that comes with TF2.0. However, there is a drawback: we need to start the training program at each node, and the distributed training will only work after all the nodes are started. MPI is mainly used in the field of supercomputing. Building MPI cluster on Raspberry, firstly, it can be used to learn distributed computing on supercomputing, and secondly, it can observe the performance of TF> distributed training on ARMv8 in practice. ...

July 9, 2020 · 6 min · alexchen

RaspberryPis Tensorflow 分布式训练1

为什么 目前自己采购了35块树莓派4core4G用来计算Rosetta@home,等到COVID-2019过去之后,会用这些开发板测试TF项目,因为TF的生态链齐全,所以在工业上会考虑使用TF来做为最终的产品技术使用方案。 未来的趋势会面向边缘计算领域,像自动驾驶,智能家居,家庭医疗辅助系统,农业生产,制造业零部件质量检测,工业机械磨损检测等等,都会考虑到数据的实时接受和传输,还有计算成本,在机器学习上,如果依靠云计算平台,去辅助上述这些项目,那么就需要考虑本地到服务中心的网络,带宽延迟,数据安全性,计算实时性的问题。如果依托边缘计算,采用工业的微控制器,在微控制器上部署模型以及Tensorflow Lite用于模型的推演,在本地解决计算高可用问题,无需将数据传递到公网上,减少带宽的消耗,从而降低计算成本。 Tensorflow aarch64 源码构建 安装依赖 apt-get install libatlas3-base libopenblas-dev libopenblas-base libblas-dev gcc gfortran python3-dev libgfortran5 g++ libhdf5-dev libfreetype-dev build-essential openjdk-11-jdk zip unzip python3-h5py python3-numpy python3-pip sudo pip3 install keras_preprocessing keras_applications 安装 Bazel install-compile-bootstrap-unix bazel 官方未给出arm64架构的二进制文件,所以需要自己手工编译 下载 bazel-2.0.0-dist.zip 运行 EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh 拷贝 output/bazel 到 /usr/local/bin/hazel 编译 Tensorflow Raspberry pi 4B 上安装的系统是Ubuntu 20.04 ARM64架构,Python Version: 3.8,Tensorflow官方未给出对应版本的python whl安装包,所以需要自己手动从源码构建 git clone https://github.com/tensorflow/tensorflow.git git checkout v2.2.0 ./configure 配置选项 编译操作之前需要增加swap分区,4G系统内存编译是完全不够的,建议swap设置6G 最好能够单独增加一块USB3转SATA的移动硬盘用来单独增加SWAP分区 fallocate -l 6G /swapfile chmod 0600 /swapfile mkswap /swapfile swapon /swapfile 执行编译操作 bazel build --config=noaws --config=nogcp --config=nohdfs --config=nonccl --config=monolithic --config=v2 --local_cpu_resources=3 //tensorflow/tools/pip_package:build_pip_package 由于是直接在4核4G的Raspberry pi 上构建,所以需要耐心等待,编译时间大概在 15 - 25 小时之间 ☕️☕️☕️ 编译完成之后执行构建pip安装包 bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg tensorflow-2.2.0-cp38-cp38-linux_aarch64.whl 安装包构建完成 最后执行 pip install tensorflow-2.2.0-cp38-cp38-linux_aarch64.whl TF 测试 使用官方的最简MNIST教程中的代码 ...

June 3, 2020 · 5 min · alexchen