GitXplorerGitXplorer
e

c2board

public
33 stars
6 forks
2 issues

Commits

List of commits on branch master.
Unverified
c3a1ed2fbcd3bf83fa682d317691e2c1fafadc70

Merge branch 'master' of https://github.com/endernewton/c2board

eendernewton committed 6 years ago
Unverified
b4467a773e8e94aeeb62fc84d9cfdbe8ab9fb648

fix bug when the number of values is zero for histogram computation.

eendernewton committed 6 years ago
Verified
703e8c82fa84437d0807c61c776b656717ec12b2

fix bug for not retuning image summary.

eendernewton committed 6 years ago
Verified
1ee7175218a3d59a1a888d090fb5d3588fb55f4e

Merge pull request #2 from sefira/master

eendernewton committed 6 years ago
Unverified
3cf0d161d935931b27ca58f43b2109ab9885a983

fix bug in writer.py for list index access

ssefira committed 6 years ago
Unverified
8501d8cadea2af5b72ca1a57b13266f14b2b71b2

add bboxes.

eendernewton committed 6 years ago

README

The README file for this repository.

c2board

A hacked-up visualization tool for caffe2. Specifically, it dumps the computation graph and the training statistics of caffe2 into a tensorboard compatible format. Once it starts dumping, you can use tensorboard to visualize the results.

Prerequisites

  • Caffe2.
  • Tensorboard. The code is meant to be standalone, so that you do not need to import both tensorflow and caffe2 at the same time -- unexpected behaviors can occur. However, tensorboard needs to be installed somewhere (like in another conda environment) for visualization, otherwise the dumped information is not useful by itself.
  • Python libraries:
    # for conda users
    conda install protobuf
    # or for ubuntu: sudo apt-get install protobuf-compiler libprotobuf-dev
    pip install json numpy Pillow six threading

Installation

  1. Clone the repository
git clone https://github.com/endernewton/c2board.git
  1. Make and install it locally
cd c2board
make

Usage

  • For graph visualization, you can follow demo_graph.py. The main function to call is writer.write_graph, which accepts either a CNNModelHelper, or Net, or NetDef object to visualize.
  • Training statistics can be divided into two types:
    • First, for scalars, they are usually loss, current iteration pre-computed, therefore we can directly store them without any additional effort. The relevant function to call is writer.write_scalars(dict, iter) where dict is the dictionary of the scalars, and iter the current iteration.
    • Second, for histograms and images, we need to call the workspace.FetchBlob function to fetch the values. For those, we first use writer.append_histogram(name) or writer.append_image(name) to build the list of blobs we are interested in when building up the graph. Then, during training we only need to call writer.write_summaries(iter) and the underlying method will take care of fetching blobs, computing histograms, etc.
  • When it starts dumping, you can just use the normal tensorboard command line to visualize things.

Screen shots

These screen shots are taken when training a detector with detectron.

References