Skip to content

Deep networks visualization #9452

Closed
Closed

Description

@dkurt
Proposal

Add functionality to visualizing topology of network.

Two ways are possible: console output and torch-like graphviz visualization.

  • Console output

    • Preferable for small architectures or for selected parts of networks. It's also useful for testing because our unit tests are based on few-layers networks.
    • Might looks like std::cout << net << std::endl; similarly for cv::Mat printing. However single method is more flexible for managing different levels of detalization (hyperparameters, input/output shapes, backend, fusion etc.). Minimal level of detalization may includes just layer types and connections, though.
    • Connections between layers seems to be a key issue because it requires appropriate indentation.
  • graphviz

    • Easier than console printing. We just write text file with .dot graph. In example,

      strict digraph sample {
        node1->node2
        node1->node3
        node2->node3
      }

      may be rendered into .png:

      dot -Tpng graph.dot > graph.png

      simple_graph

    • It has dozens of settings. Torch and supposedly Caffe use is for visualization.

Misc: this project looks pretty nice for me: http://ethereon.github.io/netscope/quickstart.html

Activity

  1. StevenPuttemans commented on Aug 24, 2017

    @StevenPuttemans

    Thanks for the pointers on the .dot graph thing :) comes in handy when writing a dissertation ^_^

  2. berak commented on Oct 5, 2017

    @berak
    Contributor

    out of curiosity, i tried a console based attempt , but ran into some obstacles:

    • you need to know the input shape, but cannot ask the Net for it (it does not remember, even though a pretrained model was imported a second ago)
    • it does not even know, how many layers it has (well, net.getLayerNames() + 1;, the input layer is a weird beast, imho)
    • there's no way (at All) to retrieve the connectivity information.

    sure, it gets a lot easier, if there is a (human readable) prototxt, but e.g. tensorflow graphs come as a huge, binary chunk

  3. alalek commented on Oct 5, 2017

    @alalek
    Member
  4. RadZaeem commented on Dec 23, 2017

    @RadZaeem

    Anyone still working on this?
    Can I take this issue

  5. vpn1997 commented on Dec 23, 2017

    @vpn1997
  6. akhandait commented on Jan 17, 2018

    @akhandait

    @dkurt Has someone already added this feature or can I work on it?
    If I can, can you please guide me on how to go about this?
    I am familiar with Caffe and just checked out graphviz.

  7. dkurt commented on Apr 14, 2019

    @dkurt
    MemberAuthor

    An issue has been implemented by @l-bat, Thanks! Feel free to test and provide your feedback. See cv::dnn::dumpToFile.

  8. aimhabo commented on Apr 20, 2019

    @aimhabo

    Just worrying about not finding a blob in 3.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions