深度学习CV行业失业工具包大集合

深度学习CV行业失业工具包大集合

序言

  • 一、目标检测工具箱
  • 二、语义分割工具箱
  • 三、OCR工具箱
  • 四、实例分割工具箱
  • 五、重识别工具箱
  • 六、GAN工具箱
  • 七、未完待续
  • 序言

    最近几年深度学习大火,AI渗透各个行业领域,也涌现了大批AI从业者,但是在最近两年中已经开始趋近于饱和,就业也开始严谨起来,对于未来的展望,让人不禁联想起java的岗位,一份招聘上百份投递。好了,废话不多说,今天要讲的是CV方向的各种工具包,为什么叫做失业大礼包,其实很容易想象,这类工具包一出,对于项目需求,扔点数据进去,也许就是调个库就可以实现,那么CV调参侠也将无用武之地,当然失业工具包这只是调侃,如果不想被行业淘汰,掌握这类工具箱是必要的,一方面里面已经涵盖了各种模型,可以大大的提高工作效率,另一方面通过对这些模型的理解,也能够更好的提升自己。

    一、目标检测工具箱

    1.1 mmdetection

    mmdetection是由商汤科技和香港中文大学开源的一个基于Pytorch实现的深度学习目标检测工具箱,这个工具箱非常的强大,支持Faster-RCNN,Mask-RCNN,Fast-RCNN、Cascade-RCNN、SSD等主流的目标检测框架,目前已经更新到2.0版本,支持的主流算法也非常多,是目前最大最全的模型库。
    在这里插入图片描述

    截至 2020 年 5 月底,MMDetection 官方模型库已经支持了35篇论文中的算法,提供了超过 250 个预训练模型,是目标检测领域最大规模的模型库。除此之外,还有 16 篇论文在 Github 上开源了基于 MMDetection 的代码。目前官方支持的算法如图所示:
    在这里插入图片描述
    在博主看来,mmdetection的价值不仅在工程上,在学术上很多新开源的高性能、高mAP检测算法都是基于mmdetection编写,例如现阶段目标检测COCO mAP榜一的DetectoRS(mAP 54.7)就是基于 MMDetection 的代码。

    使用环境:

    • Pytorch1.3 +
    • Linux(官方不支持Windows,但是网上有相关教程)
    • Python3.6 +

    相关链接:

    1.2 Detectron2

    Detectron是构建在Caffe2和Python之上计算机视觉库,集成了多项计算机视觉最新成果,一经发布广受好评。去年10月份,Facebook AI研究院又开源了Detectron的升级版,也就是接下来我们要介绍的:Detectron2

    Detectron2是和mmdetection对齐的目标检测工具箱,同样非常强大,集合了很多算法,与mmdetection号称打比赛的两大神器。
    在这里插入图片描述

    Detectron2 是 Facebook AI Research 推出的第二代CV库,它不但进一步集成了最新的目标检测算法,,而且是对先前版本 Detectron 的完全重写,号称目标检测三大开源神器之一(Detectron2/mmDetection/SimpleDet)。源自最初的maskrcnn-benchmark库。

    与 mmdetection 、TensorFlow Object Detection API一样,Detectron2 也是通过配置文件来设置各种参数,从而实现当前最优的目标检测效果。它支持与目标检测有关的一系列任务。和之前的 Detectron 相比,它也支持目标检测、实例分割、人体姿态估计等任务。此外,Detectron2 还支持语义分割和全景分割。

    Detectron2包含了一代可用的所有模型,并加入了一些新模型,现支持的模型主要有:

    • Faster R-CNN
    • Mask R-CNN
    • RetinaNet
    • DensePose
    • Cascade R-NN
    • Panoptic FPN
    • TensorMask

    具体介绍请移步:Detectron2模型介绍

    使用环境:

    • Pytorch1.3
    • Linux
    • Python3.6 +

    相关链接:

    1.3 SimpleDet

    SimpleDet是由图森未来开源的一套简单通用的目标检测与物体识别框架,整套框架基于MXNet的原生API完成。对于学习MXNet或者对其感兴趣的可以来使用SimpleDet。
    在这里插入图片描述

    同样的,SimpleDet和前面两个开源工具箱一样,支持众多的目标检测算法,而且提供了很多不同头部的实现和预训练模型,目前支持的算法主要有:

    • Faster-RCNN
    • Mask-RCNN
    • Cascade-RCNN
    • RetinaNet
    • DCNv1/v2
    • TridentNet

    具体介绍请移步:SimpleDet模型介绍

    使用环境:

    • MXNet
    • Linux
    • Python3.6 +

    相关链接:

    1.4 PaddleDetetion

    PaddleDetetion是由百度开源的一款深度学习目标检测框架,代码的编写基于百度自研的深度学习框架Paddle,该开发套件覆盖了主流的目标检测算法并提供丰富的预训练模型。如果有感兴趣支持国产的可以使用PaddleDetetion,而且近些日子,百度为了推广自己的平台,做了很多推广工作,公开了很多课程以及资源,非常适合小白入门白嫖。
    在这里插入图片描述
    相比 TensorFlow 或 PyTorch,PaddlePaddle 拥有最大的官方模型库,也就是说飞桨团队会花费大量精力维护这些模型,以保证它们的性能最优、API 最新、易用性最好。事实上Paddle已经在国内建起了非常活跃的社区,你甚至在使用Paddle时遇到了问题可以直接去询问百度的专业开发人员,还是很不错的,虽然Paddle经常被torch和tf用户看不起,但是也不至于这么不堪。

    PaddleDetection 的目的是为工业界和学术界提供丰富、易用的目标检测模型。在最近一次更新中,可以看到 PaddleDetection 优化了很多主流模型的性能:对YOLOv3的优化,精度提升4.3%,训练提速40%,推理提速21%;以及加入了此前COCO上最优精度的CBNet等。目前PaddleDetection支持的主流算法模型主要有:
    在这里插入图片描述
    新增的模型:

    • EfficientDet
    • FCOS
    • CornerNet-Squeeze
    • YOLOv4

    详细介绍移步:PaddleDetection模型介绍

    使用环境:

    • PaddlePaddle 1.7+
    • Linux or Windows
    • Python3.6+

    相关链接:

    二、语义分割工具箱

    2.1 semantic-segmentation-pytorch

    在这里插入图片描述
    其实这个工具箱我也没用过,不过里面实现了很多的语义分割模型,在github上获得了3.2k的Star,并且是基于Pytorch,使用起来也很方便,感兴趣的同学可以去看看。

    现支持的模型有:
    在这里插入图片描述
    相关链接:

    2.2 Semantic-Segmentation-Keras

    在这里插入图片描述
    同样的,这款工具箱也没有名字,因为是基于Keras实现的,所以我就索性标题直接这么称呼了。这款语义分割工具箱是由GiantPandaCV公众号作者BBuf和pprp共同开源和维护,目前已经支持了很多语义分割算法,而且更新频率非常快,并且作者团队正在扩大,相信未来一定能够将这个库做的更加完善,值得期待,如果你在使用这个库时有疑问可以直接加群联系作者进行解疑,社区很活跃。

    先已支持的分割模型:
    在这里插入图片描述
    详细介绍移步:Keras-Sematic-Segmentation介绍

    使用环境:
    - tensorflow 1.8.0/1.13.0
    - keras 2.2.4
    - GTX 2080Ti/CPU
    - Cuda 10.0 + Cudnn7

    相关链接:

    三、OCR工具箱

    3.1 chineseocr_lite

    chineseocr_lite是一个超轻量级中文ocr开源项目,代码基于pytorch编写,支持竖排文字识别,支持 ncnn 推理,psenet (8.5M) + crnn (6.3M) + anglenet (1.5M) 总模型仅17M。目前,这个开源项目已在GitHub上标星4800+。
    在这里插入图片描述
    该 chineseocr_lite 项目表示,相比chineseocr(基于 YOLO V3 与 CRNN 实现中文自然场景文字检测及识别),它采用了轻量级的主干网络 PSENet,轻量级的 CRNN 模型和行文本方向分类网络 AngleNet。尽管要实现多种能力,但 chineseocr_lite 总体模型只有 17M。

    chineseocr_lite虽然小,但是能够实现的功能却非常强大:

    • 提供轻量的 backone 检测模型 psenet(8.5M),crnn_lstm_lite (9.5M) 和行文本方向分类网络(1.5M);
    • 任意方向文字检测,识别时判断行文本方向;
    • crnn\crnn_lite lstm\dense识别(ocr-dense和ocr-lstm是搬运chineseocr 的);
    • 支持竖排文本识别;
    • ncnn实现psenet(未实现核扩展);
    • ncnn实现crnn_dense(改变了全连接为conv1x1);
    • ncnn实现shuuflenev2角度分类网络;
    • ncnn实现ocr整个流程;

    最近,项目作者对更新了可实现的功能。

    • 实现的crnn_lstm推理;
    • 升级crnn_lite_lstm_dw.pth模型crnn_lite_lstm_dw_v2.pth , 精度更高;
    • 提供竖排文字样例以及字体库(旋转90度的字体)。

    这款轻量型的OCR开源项目,无疑是为OCR从业者们提供了便利,如果你是刚入行的OCR算法工程师或者准备入行,可以花点时间好好研究一下。

    使用环境:

    • Pytorch1.2+
    • Linux/Macos/Windows

    相关链接:

    3.2 PaddleOCR

    PaddleOCR是今日百度基于Paddle框架开源的一款超轻量型的OCR工具箱.模型由1个文本检测模型(4.1M)和1个文本识别模型(4.5M)组成,共8.6M。
    在这里插入图片描述
    其中,文本检测模型使用的2020年发表于AAAI上的DB算法,文本识别模型使用经典的CRNN算法。鉴于MobileNetV3在端侧系列模型中的优越表现,两个模型均选择使用MobileNetV3作为骨干网络,可将模型大小初步减少90%以上。
    在这里插入图片描述
    这款工具箱的实现非常强大,并且有百度的专人进行维护,你在使用过程中如果遇到任何问题,都可以添加他们的微信群进行提问解答。并且结合了百度的模型压缩和部署,可以很好的应用于实际环境中,这对于博主这种pytorch的忠实用户来说还是很诱惑的。感兴趣的可以下载下来研究。

    详细介绍移步:PaddleOCR

    使用环境:

    • PaddlePaddle 1.7+
    • Linux (暂时不支持windows)
    • Python3.6+

    相关链接:

    四、实例分割工具箱

    4.1 AdelaiDet

    实例分割大家应该都不陌生了,大名鼎鼎的mask-RCNN,在上诉的每个检测框架里,都不敢缺少它,当然除了mask-RCNN以外,还有很多其他的实例分割算法,例如:YOLCAT、PolarMask、SOLO、BlendMask等。
    在这里插入图片描述
    其实在实例分割领域,现阶段使用最多的还是mask-rcnn(永远滴神啊),如果在项目中要用到,可以直接在上诉的几个检测工具箱中直接使用,但是如果不局限于使用mask-rcnn,可以考虑一下这个实例分割工具箱:AdelaiDet。

    AdelaiDet是在Detectron2基础之上编写的实例分割工具箱,目前实现了包括业内最好的实例分割模型SOLOv2、BlendMask等。作者维护的也比较频繁,感兴趣的可以研究研究。

    目前该工具箱内支持的模型有:

    • FCOS
    • BlendMask
    • MEInst
    • ABCNet
    • SOLO to be released (mmdet version)
    • SOLOv2 to be released (mmdet version)
    • DirectPose to be released
    • CondInst to be released

    使用环境:

    • pytorch1.2+
    • Linux

    相关链接:

    五、重识别工具箱

    5.1 FastReID

    FastReID是最近由京东研究院开源的重识别框架,是一个 SOTA 级的 ReID 方法集合工具箱,同时面向学术界和工业界落地,此外该团队还发布了在多个不同任务、多种数据集上的SOTA模型。
    在这里插入图片描述
    FastReID 参照了 Detectron2 的整体概念和设计哲学,设计成了一个高度模块化和可拓展的架构,从而可以让研究人员快速的实现新的 idea ;更重要的是,该框架友好的管理系统配置和工程部署函数可以让工程师快速的部署它。作者提供了 PyTorch 模型转 Caffe、ONNX 和 TensorRT 的例子和脚本。

    另外,作者宣称这是迄今为止最完整的、最高性能的ReID工具箱,支持单卡和多GPU训练,使用简单方便。

    FastReID中实现的四大ReID任务:

    • 行人重识别
    • 部分区域的行人重识别
    • 跨域的行人重识别
    • 车辆的重识别

    不仅限于行人,也可以检索车辆等其他物体。

    相关链接:

    六、GAN工具箱

    6.1 Pytorch-GAN

    这个基于pytorch的GAN大礼包,是由32种热门GAN的开源代码组成,每个GAN代码独立分开,非常简洁,而且作者还附带了各种GAN的论文地址,目前该项目在github上已经获得了超过6400+的标星。
    在这里插入图片描述
    实现的32种GAN模型有:

    • Auxiliary Classifier GAN
    • Adversarial Autoencoder
    • BEGAN
    • BicycleGAN
    • Boundary-Seeking GAN
    • Cluster GAN
    • Conditional GAN
    • Context-Conditional GAN
    • Context Encoder
    • Coupled GAN
    • CycleGAN
    • Deep Convolutional GAN
    • DiscoGAN
    • DRAGAN
    • DualGAN
    • Energy-Based GAN
    • Enhanced Super-Resolution GAN
    • GAN
    • InfoGAN
    • Least Squares GAN
    • MUNIT
    • Pix2Pix
    • PixelDA
    • Relativistic GAN
    • Semi-Supervised GAN
    • Softmax GAN
    • StarGAN
    • Super-Resolution GAN
    • UNIT
    • Wasserstein GAN
    • Wasserstein GAN GP
    • Wasserstein GAN DIV

    这么强大的GAN工具箱,看的眼花缭乱,你确定不要试试?

    相关链接:

    6.2 Keras-GAN

    接下来介绍的这个Keras版本的GAN与上面的一样,同样是集合了众多的GAN模型与一身,并且得到Keras亲爸爸François Chollet在Twitter上的热情推荐,在github上面也获得了超过7000+的标星。
    在这里插入图片描述
    同样的,里面实现了21个GAN模型,与之前的pytorch版本有些重合:

    • Auxiliary Classifier GAN
    • Adversarial Autoencoder
    • Bidirectional GAN
    • Boundary-Seeking GAN
    • Conditional GAN
    • Context-Conditional GAN
    • Context Encoder
    • Coupled GANs
    • CycleGAN
    • Deep Convolutional GAN
    • DiscoGAN
    • DualGAN
    • Generative Adversarial Network
    • InfoGAN
    • LSGAN
    • Pix2Pix
    • PixelDA
    • Semi-Supervised GAN
    • Super-Resolution GAN
    • Wasserstein GAN
    • Wasserstein GAN GP

    相关链接:

    对于每种GAN的介绍,博主就不写了,因为博主对GAN实在是不太了解,要花太多时间去给大家科普的话也不划算,感兴趣的可以根据相关的链接内容进行学习。

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
深度学习工具包 Deprecation notice. ----- This toolbox is outdated and no longer maintained. There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/) I would suggest you use one of the tools mentioned above rather than use this toolbox. Best, Rasmus. DeepLearnToolbox ================ A Matlab toolbox for Deep Learning. Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data. It is inspired by the human brain's apparent deep (layered, hierarchical) architecture. A good overview of the theory of Deep Learning theory is [Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf) For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng. * [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007) * [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010) * [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011) If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284) ``` @MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012", } ``` Contact: rasmusbergpalm at gmail dot com Directories included in the toolbox ----------------------------------- `NN/` - A library for Feedforward Backpropagation Neural Networks `CNN/` - A library for Convolutional Neural Networks `DBN/` - A library for Deep Belief Networks `SAE/` - A library for Stacked Auto-Encoders `CAE/` - A library for Convolutional Auto-Encoders `util/` - Utility functions used by the libraries `data/` - Data used by the examples `tests/` - unit tests to verify toolbox is working For references on each library check REFS.md Setup ----- 1. Download. 2. addpath(genpath('DeepLearnToolbox')); Example: Deep Belief Network --------------------- ```matlab function test_example_DBN load mnist_uint8; train_x = double(train_x) / 255; test_x = double(test_x) / 255; train_y = double(train_y); test_y = double(test_y); %% ex1 train a 100 hidden unit RBM and visualize its weights rand('state',0) dbn.sizes = [100]; opts.numepochs = 1; opts.batchsize = 100; opts.momentum = 0; opts.alpha = 1; dbn = dbnsetup(dbn, train_x, opts); dbn = dbntrain(dbn, train_x, opts); figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights %% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NN rand('state',0) %train dbn dbn.sizes = [100 100]; opts.numepochs = 1; opts.batchsize = 100; opts.momentum = 0; opts.alpha = 1; dbn = dbnsetup(dbn, train_x, opts); dbn = dbntrain(dbn, train_x, opts); %unfold dbn to nn nn = dbnunfoldtonn(dbn, 10); nn.activation_function = 'sigm'; %train nn opts.numepochs = 1; opts.batchsize = 100; nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.10, 'Too big error'); ``` Example: Stacked Auto-Encoders --------------------- ```matlab function test_example_SAE load mnist_uint8; train_x = double(train_x)/255; test_x = double(test_x)/255; train_y = double(train_y); test_y = double(test_y); %% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN % Setup and train a stacked denoising autoencoder (SDAE) rand('state',0) sae = saesetup([784 100]); sae.ae{1}.activation_function = 'sigm'; sae.ae{1}.learningRate = 1; sae.ae{1}.inputZeroMaskedFraction = 0.5; opts.numepochs = 1; opts.batchsize = 100; sae = saetrain(sae, train_x, opts); visualize(sae.ae{1}.W{1}(:,2:end)') % Use the SDAE to initialize a FFNN nn = nnsetup([784 100 10]); nn.activation_function = 'sigm'; nn.learningRate = 1; nn.W{1} = sae.ae{1}.W{1}; % Train the FFNN opts.numepochs = 1; opts.batchsize = 100; nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.16, 'Too big error'); ``` Example: Convolutional Neural Nets --------------------- ```matlab function test_example_CNN load mnist_uint8; train_x = double(reshape(train_x',28,28,60000))/255; test_x = double(reshape(test_x',28,28,10000))/255; train_y = double(train_y'); test_y = double(test_y'); %% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% error rand('state',0) cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer }; cnn = cnnsetup(cnn, train_x, train_y); opts.alpha = 1; opts.batchsize = 50; opts.numepochs = 1; cnn = cnntrain(cnn, train_x, train_y, opts); [er, bad] = cnntest(cnn, test_x, test_y); %plot mean squared error figure; plot(cnn.rL); assert(er<0.12, 'Too big error'); ``` Example: Neural Networks --------------------- ```matlab function test_example_NN load mnist_uint8; train_x = double(train_x) / 255; test_x = double(test_x) / 255; train_y = double(train_y); test_y = double(test_y); % normalize [train_x, mu, sigma] = zscore(train_x); test_x = normalize(test_x, mu, sigma); %% ex1 vanilla neural net rand('state',0) nn = nnsetup([784 100 10]); opts.numepochs = 1; % Number of full sweeps through data opts.batchsize = 100; % Take a mean gradient step over this many samples [nn, L] = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.08, 'Too big error'); %% ex2 neural net with L2 weight decay rand('state',0) nn = nnsetup([784 100 10]); nn.weightPenaltyL2 = 1e-4; % L2 weight decay opts.numepochs = 1; % Number of full sweeps through data opts.batchsize = 100; % Take a mean gradient step over this many samples nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); %% ex3 neural net with dropout rand('state',0) nn = nnsetup([784 100 10]); nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through data opts.batchsize = 100; % Take a mean gradient step over this many samples nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); %% ex4 neural net with sigmoid activation function rand('state',0) nn = nnsetup([784 100 10]); nn.activation_function = 'sigm'; % Sigmoid activation function nn.learningRate = 1; % Sigm require a lower learning rate opts.numepochs = 1; % Number of full sweeps through data opts.batchsize = 100; % Take a mean gradient step over this many samples nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); %% ex5 plotting functionality rand('state',0) nn = nnsetup([784 20 10]); opts.numepochs = 5; % Number of full sweeps through data nn.output = 'softmax'; % use softmax output opts.batchsize = 1000; % Take a mean gradient step over this many samples opts.plot = 1; % enable plotting nn = nntrain(nn, train_x, train_y, opts); [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); %% ex6 neural net with sigmoid activation and plotting of validation and training error % split training data into training and validation data vx = train_x(1:10000,:); tx = train_x(10001:end,:); vy = train_y(1:10000,:); ty = train_y(10001:end,:); rand('state',0) nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax output opts.numepochs = 5; % Number of full sweeps through data opts.batchsize = 1000; % Take a mean gradient step over this many samples opts.plot = 1; % enable plotting nn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally) [er, bad] = nntest(nn, test_x, test_y); assert(er < 0.1, 'Too big error'); ``` [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值