(Translated by https://www.hiragana.jp/)
DenseNet-121 - Wolfram Neural Net Repository

DenseNet-121 Trained on ImageNet Competition Data

Identify the main object in an image

This model introduces the Dense Convolutional Network (DenseNet) paradigm, connecting each layer to every other layer in a feed-forward fashion. For each layer, the feature maps of all preceding layers are used as inputs and its own feature maps are used as inputs into all subsequent layers. Rather then using explicit dense connections, this implementation achieves the same result by ordinary skip connections and concatenations.

Number of layers: 427 | Parameter count: 8,062,504 | Trained size: 34 MB |

Training Set Information

Performance

Examples

Resource retrieval

Get the pre-trained net:

In[1]:=
NetModel["DenseNet-121 Trained on ImageNet Competition Data"]
Out[1]=

Basic usage

Classify an image:

In[2]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/673c76a6-119e-4da4-8fab-71b4a76aad0b"]
Out[2]=

The prediction is an Entity object, which can be queried:

In[3]:=
pred["Definition"]
Out[3]=

Get a list of available properties of the predicted Entity:

In[4]:=
pred["Properties"]
Out[4]=

Obtain the probabilities of the 10 most likely entities predicted by the net:

In[5]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/020f0303-0a1f-4e10-9bb4-482f03c64ea5"]
Out[5]=

An object outside the list of the ImageNet classes will be misidentified:

In[6]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/7744e97d-3442-4657-8d03-be4dad94c906"]
Out[6]=

Obtain the list of names of all available classes:

In[7]:=
EntityValue[
 NetExtract[
   NetModel["DenseNet-121 Trained on ImageNet Competition Data"], "Output"][["Labels"]], "Name"]
Out[7]=

Requirements

Wolfram Language 12.2 (December 2020) or above

Resource History

Reference