可用模型
AlexNet
AlexNet
Dl4J的AlexNet模型解释基于原始论文《基于深度卷积神经网络的ImageNet分类》和引用的imagenet示例代码。
参考文献:
http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdfhttps://github.com/BVLC/caffe/blob/master/models/bvlc_alexnet/train_val.prototxt
在DL4J中建立基于可用功能的模型,注释指示哪里是等待增强的间隙。
论文中某些层中偏置是1,但是在imagenet示例代码中的是0.1,论文中所有层使用标准差为0.1的权重分布, 但是在imagenet示例代码中的密连层使用0.005。
Darknet19
Darknet19
参考文献: https://arxiv.org/pdf/1612.08242.pdf
该模型的ImageNet权重是可用的,并且已经从https://pjreddie.com/darknet/imagenet/使用https://github.com/allanzelener/YAD2K进行了转换。
有2个预先训练的模型,一个为224x224图像和一个微调448×448图像。初始化之前调用{ 3, 224, 224 }或{ 3, 448, 448 }的setInputShape()。输入图像的通道需要以RGB顺序(而不是BGR),值在[0, 1 ]内归一化。输出标签为:https://github.com/pjreddie/darknet/blob/master/data/imagenet.shortnames.list
FaceNetNN4Small2
依赖于嵌入和三重损失的原始FaceNet模型的变体。参考文献: https://arxiv.org/abs/1503.03832
还基于OpenFace实现:http://reports-archive.adm.cs.cmu.edu/anon/2016/CMU-CS-16-118.pdf
InceptionResNetV1
依赖于嵌入和三重损失的原始FaceNet模型的变体。参考文献: https://arxiv.org/abs/1503.03832
还基于OpenFace实现:http://reports-archive.adm.cs.cmu.edu/anon/2016/CMU-CS-16-118.pdf
LeNet
LeNet是ImageNet数据集上的早期有希望的成就者。参考文献:
- http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf
- https://github.com/BVLC/caffe/blob/master/examples/mnist/lenet.prototxt
该模型的MNIST权重是可用的,并且已经从 https://github.com/f00-/mnist-lenet-keras 转换。
NASNet
U-Net
NASNet-A在DL4J中的实现。NASNet引用了神经架构搜索网络, 通过直接在感兴趣的数据集中学习模型架构而自动设计的一系列模型。
此实现使用1056个倒数第二滤波器和输入形状(3, 224, 224)。你可以改变这个。
论文: https://arxiv.org/abs/1707.07012 这个模型的ImageNet权重是可用的,并且已经从https://keras.io/applications/转换。
ResNet50
深度学习残差网络
论文: https://arxiv.org/abs/1512.03385 这个模型的ImageNet权重是可用的,并且已经从https://keras.io/applications/转换。
SimpleCNN
一种用于一般图像分类的简单卷积网络。参考文献: https://github.com/oarriaga/face_classification/
SqueezeNet
U-Net
SqueezeNet的实现。与AlexNet小部分参数精度相似。
论文: https://arxiv.org/abs/1602.07360 这个模型的ImageNet权重是可用的,并且已经从 https://github.com/rcmalli/keras-squeezenet/ 转换
TextGenerationLSTM
设计用于文本生成的LSTM。可以在文本语料库上进行训练。对于这个模型,numClasses是
遵循这一实现:https://github.com/fchollet/keras/blob/master/examples/lstm_text_generation.py 的架构
沃尔特·惠特曼权重可用于从他的作品生成文本,改编自 https://github.com/craigomac/InfiniteMonkeys.
TinyYOLO
Tiny YOLO 参考文献: https://arxiv.org/pdf/1612.08242.pdf
该模型的ImageNet+VOC权重是可用的,并且已经从https://pjreddie.com/darknet/yolo使用 https://github.com/allanzelener/YAD2K 和以下代码进行了转换。
String filename = “tiny-yolo-voc.h5”; ComputationGraph graph = KerasModelImport.importKerasModelAndWeights(filename, false);
INDArray priors = Nd4j.create(priorBoxes);
FineTuneConfiguration fineTuneConf = new FineTuneConfiguration.Builder() .seed(seed) .iterations(iterations) .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT) .gradientNormalization(GradientNormalization.RenormalizeL2PerLayer) .gradientNormalizationThreshold(1.0)
.updater(new Adam.Builder().learningRate(1e-3).build())
.l2(0.00001)
.activation(Activation.IDENTITY)
.trainingWorkspaceMode(workspaceMode)
.inferenceWorkspaceMode(workspaceMode)
.build();
ComputationGraph model = new TransferLearning.GraphBuilder(graph) .fineTuneConfiguration(fineTuneConf)
.addLayer(“outputs”, new Yolo2OutputLayer.Builder() .boundingBoxPriors(priors) .build(), “conv2d_9”)
.setOutputs(“outputs”)
.build();
System.out.println(model.summary(InputType.convolutional(416, 416, 3)));
ModelSerializer.writeModel(model, “tiny-yolo-voc_dl4j_inference.v1.zip”, false);
416X416输入图像的通道需要以RGB顺序(而不是BGR),值在[0, 1 ]内归一化。
UNet
U-Net
U-NET是一种深度学习网络,在DL4J中用于图像分割。U-NET-卷积网络结构用于图像的快速精确分割。到目前为止,它在分割神经元结构的电子栈ISBI的挑战中已经优于现有的最佳方法(滑动窗口卷积网络)。
论文:https://arxiv.org/abs/1505.04597权重在合成数据集上训练的图像分割中可用。
VGG16
VGG-16,来自非常深的卷积网络用于大规模图像识别。https://arxiv.org/abs/1409.1556
深度人脸识别
http://www.robots.ox.ac.uk/~vgg/publications/2015/Parkhi15/parkhi15.pdf
该模型的ImageNet权重是可用的,并且已经从https://github.com/fchollet/keras/tree/1.1.2/keras/applications进行了转换。
该模型的CIFAR-10权重是可用的,并且已经使用来自https://github.com/rajatvikramsingh/cifar10-vgg16的“approach 2”进行了转换。
这个模型的VGGFace权重是可用的,并且已经从https://github.com/rcmalli/keras-vggface转换。
VGG19
VGG-19,来自非常深的卷积网络用于大规模图像识别。
https://arxiv.org/abs/1409.1556
该模型的ImageNet权重是可用的,并且已经从 https://github.com/fchollet/keras/tree/1.1.2/keras/applications 进行了转换。
Xception
U-Net
An implementation of Xception in Deeplearning4j. A novel deep convolutional neural network architecture inspired by Inception, where Inception modules have been replaced with depthwise separable convolutions.
Xception在DL4J中的实现。受Inception的启发,一种新的深度卷积神经网络结构,其中Inception模块已经被深度可分离卷积所取代。
论文: https://arxiv.org/abs/1610.02357 该模型的ImageNet权重是可用的,并且已经从 https://keras.io/applications/ 进行了转换。
YOLO2
YOLOv2 参考文献: https://arxiv.org/pdf/1612.08242.pdf
这个模型的ImageNet+COCO权重是可用的,并且已经从https://pjreddie.com/darknet/yolo使用https://github.com/allanzelener/YAD2K和如下代码进行了转换。
String filename = “yolo.h5”;
KerasLayer.registerCustomLayer(“Lambda”, KerasSpaceToDepth.class);
ComputationGraph graph = KerasModelImport.importKerasModelAndWeights(filename, false); INDArray priors = Nd4j.create(priorBoxes);
FineTuneConfiguration fineTuneConf = new FineTuneConfiguration.Builder()
.seed(seed)
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT) .gradientNormalization(GradientNormalization.RenormalizeL2PerLayer) .gradientNormalizationThreshold(1.0)
.updater(new Adam.Builder().learningRate(1e-3).build())
.l2(0.00001)
.activation(Activation.IDENTITY)
.trainingWorkspaceMode(workspaceMode)
.inferenceWorkspaceMode(workspaceMode)
.build();
ComputationGraph model = new TransferLearning.GraphBuilder(graph) .fineTuneConfiguration(fineTuneConf)
.addLayer(“outputs”, new Yolo2OutputLayer.Builder() .boundingBoxPriors(priors) .build(), “conv2d_23”)
.setOutputs(“outputs”)
.build();
System.out.println(model.summary(InputType.convolutional(608, 608, 3)));
ModelSerializer.writeModel(model, “yolo2_dl4j_inference.v1.zip”, false);
608X608输入图像的通道需要以RGB顺序(而不是BGR),值在[0, 1 ]内归一化。
pretrainedUrl
public String pretrainedUrl(PretrainedType pretrainedType)
模型的默认先验框