Wolfram Computation Meets Knowledge

Inception V1 Trained on Extended Salient Object Subitizing Data

Count the number of prominent items in an image

Released in 2016, this neural net is a fine-tuning of the Inception V1 model trained on the Extended Salient Object Subitizing dataset. In order to improve the performance, the dataset has been enlarged by more than a factor of 2 with synthetic images, obtained by placing segmented objects over background images.

Number of layers: 147 | Parameter count: 5,978,677 | Trained size: 24 MB

Training Set Information

Performance

Examples

Resource retrieval

Retrieve the resource object:

In[1]:=
ResourceObject["Inception V1 Trained on Extended Salient Object \
Subitizing Data"]
Out[1]=

Get the pre-trained net:

In[2]:=
NetModel["Inception V1 Trained on Extended Salient Object Subitizing \
Data"]
Out[2]=

Basic usage

Obtain the number of salient objects in an image:

In[3]:=
CloudGet["https://www.wolframcloud.com/objects/de144ee0-3762-49f1-86e5-93434fa99cca"] (* Evaluate this cell to copy the example input from a cloud object *)
Out[3]=

Obtain the probabilities:

In[4]:=
CloudGet["https://www.wolframcloud.com/objects/07db4e9a-04b8-4c34-b079-8563b8b002f6"] (* Evaluate this cell to copy the example input from a cloud object *)
Out[4]=

Net information

Inspect the number of parameters of all arrays in the net:

In[5]:=
NetInformation[
 NetModel["Inception V1 Trained on Extended Salient Object Subitizing \
Data"], "ArraysElementCounts"]
Out[5]=

Obtain the total number of parameters:

In[6]:=
NetInformation[
 NetModel["Inception V1 Trained on Extended Salient Object Subitizing \
Data"], "ArraysTotalElementCount"]
Out[6]=

Obtain the layer type counts:

In[7]:=
NetInformation[
 NetModel["Inception V1 Trained on Extended Salient Object Subitizing \
Data"], "LayerTypeCounts"]
Out[7]=

Display the summary graphic:

In[8]:=
NetInformation[
 NetModel["Inception V1 Trained on Extended Salient Object Subitizing \
Data"], "SummaryGraphic"]
Out[8]=

Export to MXNet

Export the net into a format that can be opened in MXNet:

In[9]:=
jsonPath = 
 Export[FileNameJoin[{$TemporaryDirectory, "net.json"}], 
  NetModel["Inception V1 Trained on Extended Salient Object \
Subitizing Data"], "MXNet"]
Out[9]=

Export also creates a net.params file containing parameters:

In[10]:=
paramPath = FileNameJoin[{DirectoryName[jsonPath], "net.params"}]
Out[10]=

Get the size of the parameter file:

In[11]:=
FileByteCount[paramPath]
Out[11]=

The size is similar to the byte count of the resource object:

In[12]:=
ResourceObject[
  "Inception V1 Trained on Extended Salient Object Subitizing \
Data"]["ByteCount"]
Out[12]=

Represent the MXNet net as a graph:

In[13]:=
Import[jsonPath, {"MXNet", "NodeGraphPlot"}]
Out[13]=

Requirements

Wolfram Language 11.2 (September 2017) or above

Resource History

Reference