Simon Shi的小站

人工智能,机器学习 学习记录


  • Home

  • About

  • Tags

  • Categories

  • Archives

Tensorflow Slim

Posted on 2021-09-10 | In DNN_platform , tensorflow
[TOC] 1.变量的定义123456789101112131415161718192021222324252627282930313233343536from __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_functionimport tensorflow as tfslim = tf.contrib.slim#模型变量weights = slim.model_variable('weights', shape=[1, 1, 3 , 3], initializer=tf.truncated_normal_initializer(stddev=0.1), regularizer=slim.l2_regularizer(0.05), ...
Read more »

Tensorflow 2.x

Posted on 2021-09-09 | In DNN_platform , tensorflow
tensorflow2 tf keras python 依赖 TF2.0 Keras2.3.1 3.6,3.7 TF2.1 Keras2.3.1 3.6,3.7 TF2.2 Keras2.3.1 3.6-3.8 TF2.3 Keras2.4.3 3.6-3.8 h5py=2.10.0hdf5=1.10.4numpy=1.19.2 TF2.4 Keras2.4.3 3.6-3.8 TF2.5 3.6-3.9 TF2.6 Keras2.6 3.6-3.9 ENVCUDA11.1+cuDNN8.0.5+tensorflow-gpu2.4.1 CUDA11.1+cuDNN8.0.5+tensorflow-gpu2.4.1 CUDA11.1+cuDNN8.0.5+tensorflow-gpu2.4.1 load123tf.saved_model.load( export_dir, tags=None, options=None) Loading Keras models 1234model = tf.keras.Mode ...
Read more »

Tensorflow 1.x

Posted on 2021-09-09 | In DNN_platform , tensorflow
[TOC] tensorflow TF Keras python TF1.12 Keras2.2.4 TF1.13 Keras2.2.4 TF1.14 Keras2.2.5 3.6,3.7 TF1.15 Keras2.2.5 resnet模型搭建 eager keras resnet (转pb比较麻烦) tf slim resnet(DDZ) tf pure resnet (DDZ v2) keras TF cmd flags1234TF_CPP_MIN_LOG_LEVEL 取值 0 : 0也是默认值,输出所有信息TF_CPP_MIN_LOG_LEVEL 取值 1 : 屏蔽通知信息TF_CPP_MIN_LOG_LEVEL 取值 2 : 屏蔽通知信息和警告信息TF_CPP_MIN_LOG_LEVEL 取值 3 : 屏蔽通知信息、警告信息和报错信息 BN训练技巧demo1:123456update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS, scope)updates_op = t ...
Read more »

Pytorch pth to onnx

Posted on 2021-06-12 | In DNN_platform , pytorch , onnx
[TOC] ONNX环境配置Install1234# CPU版本pip install onnxruntime# GPU版本pip install onnxruntime-gpu OnnxRun12345>>> import onnxruntime>>> onnxruntime.get_device()'GPU' #表示GPU可用>>> onnxruntime.get_available_providers()['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] 如果GPU不可用,可以在 ~/.bashrc 中添加下面两行内容: 12export PATH=/usr/local/cuda/bin:$PATHexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH Demo: 1234567891011121314151617import onnxruntim ...
Read more »

TF使用Keras

Posted on 2021-05-23 | In DNN_platform , tensorflow , Keras
APIScompile参数介绍123456789model.compile( optimizer, loss = None, metrics = None, loss_weights = None, sample_weight_mode = None, weighted_metrics = None, target_tensors = None) optimizer:优化器,用于控制梯度裁剪。必选项loss:损失函数(或称目标函数、优化评分函数)。必选项metrics:评价函数用于评估当前训练模型的性能。当模型编译后(compile),评价函数应该作为 metrics 的参数来输入。评价函数和损失函数相似,只不过评价函数的结果不会用于训练过程中。 https://blog.csdn.net/huang1024rui/article/details/120055487 TF2.3-Keras Sequential 顺序模型123456789from keras.models import Sequentialfrom keras.layers i ...
Read more »

Mask RCNN

Posted on 2021-02-05 | In CV , BaseWork , Segmentation
Mask R-CNN是在Faster R-CNN的基础上添加了一个预测分割mask的分支,如上图所示。其中黑色部分为原来的Faster-RCNN,红色部分为在Faster-RCNN网络上的修改。将RoI Pooling 层替换成了RoIAlign层;添加了并列的FCN层(mask层)。 Mask RCNN库的使用 环境安装:1234567891011121314Installation1.Clone this repository2.Install dependencies pip3 install -r requirements.txt3.Run setup from the repository root directory python3 setup.py install4.Download pre-trained COCO weights (mask_rcnn_coco.h5) from the releases page.(https://github.com/matterport/Mask_RCNN/releases)5.(Optional) To train or te ...
Read more »

计算机视觉--视觉2D数据库

Posted on 2021-01-29 | In CV , Datasets
人脸数据PubFiG这是哥伦比亚大学的公众人物脸部数据集,包含有200个人的58k+人脸图像,主要用于非限制场景下的人脸识别。 Multi-Task Facial Landmark (MTFL) dataset该数据集包含了将近13000张人脸图片,均采自网络。 BioID Face Database - FaceDB这个数据集包含了1521幅分辨率为384x286像素的灰度图像。 每一幅图像来自于23个不同的测试人员的正面角度的人脸。为了便于做比较,这个数据集也包含了对人脸图像对应的手工标注的人眼位置文件。 图像以 “BioID_xxxx.pgm”的格式命名,其中xxxx代表当前图像的索引(从0开始)。类似的,形如”BioID_xxxx.eye”的文件包含了对应图像中眼睛的位置。 Labeled Faces in the Wild Home (LFW)More than 13,000 images of faces collected from the web. Each face has been labeled with the name of the person pictu ...
Read more »

图像修复+高清

Posted on 2021-01-19 | In CV_Apply , SR
AI还原的朱元璋、兵马俑来了!杜甫激燃演唱奥特曼主题曲,B站Up主大谷新作 Denis 在这一视频中所使用的修复技术有五种,分别是 Face-Image-Motion-Model、StyleGAN2-Face-Modificator、DAIN、ESRGAN 和 Artbreeder。 Face-Image-Motion-Model项目地址:https://github.com/tg-bomze/Face-Image-Motion-Model 该模型基于「First Order Motion」这一核心模型,方法来源于 NeurIPS 2019 论文《First Order Motion Model for Image Animation》。机器之心此前介绍过的视频会议换脸软件「Avatarify」,也是基于这一技术实现人脸处理的。 论文链接:https://papers.nips.cc/paper/8935-first-order-motion-model-for-image-animation.pdf 「First Order Motion」框架由两个主要模块组成:「运动估计模块」和「 ...
Read more »

Few Shot Learning(小样本学习)

Posted on 2021-01-19 | In AI , DeepLearning
[TOC] 小样本学习原文:https://zhuanlan.zhihu.com/p/61215293 作者丨耿瑞莹、李永彬、黎槟华 单位丨阿里巴巴智能服务事业部小蜜北京团队 分类非常常见,但如果每个类只有几个标注样本,怎么办呢? 笔者所在的阿里巴巴小蜜北京团队就面临这个挑战。我们打造了一个智能对话开发平台——Dialog Studio,以赋能第三方开发者来开发各自业务场景中的任务型对话,其中一个重要功能就是对意图进行分类。大量平台用户在创建一个新对话任务时,并没有大量标注数据,每个意图往往只有几个或十几个样本。 面对这类问题,有一个专门的机器学习分支——Few-shot Learning 来进行研究和解决。过去一年,我们对 Few-shot Learning 进行了系统的梳理和研究,将 Few-shot Learning 和 Capsule Network 融合,提出了 Induction Network,在文本分类上做到了新的 state-of-the-art。创新总是基于对已有成果的梳理和思考,这篇综述算是一个小结,写出来和大家一起分享,一起讨论。 本文先介绍 Few-shot ...
Read more »

AR Demo

Posted on 2021-01-19 | In AR
仅需6分钟,教你快速学会制作AR增强现实APP[数艺网] WebAR优秀作品分享(持续更新)
Read more »
1…171819…29

Simon Shi

286 posts
132 categories
243 tags
RSS
© 2024 Simon Shi
Powered by Hexo
|
Theme — NexT.Muse v5.1.4