Module Expr Str Import alias identifier TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias ImportFrom alias Import alias identifier ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str Assign NameStore Num Assign NameStore Num Print BinOpMod Str Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore BinOpDiv Num Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str AugAssignMult NameStore BinOpDiv Num Call AttributeLoad NameLoad attr NameLoad Print NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword ListLoad Num Num keyword ListLoad Num Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad keyword Num keyword Num keyword Num keyword Num keyword Call NameLoad BinOpAdd NameLoad Str keyword Num keyword Num keyword Num keyword Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign TupleStore NameStore NameStore TupleLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Assign NameStore SubscriptLoad NameLoad Index CompareNotEq NameLoad Num Print BinOpMod Str Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad
N/A N/A 
===========================================
Semantic Image Segmentation on Pascal VOC
===========================================
This example demonstrates learning a superpixel CRF
for semantic image segmentation.
To run the experiment, please download the pre-processed data from:
http://www.ais.uni-bonn.de/deep_learning/downloads.html

The data consists of superpixels, unary potentials, and the connectivity
structure of the superpixels.
The unary potentials were originally provided by Philipp Kraehenbuehl:
http://graphics.stanford.edu/projects/densecrf/

The superpixels were extracted using SLIC.
The code for generating the connectivity graph and edge features will be made
available soon.

This example does not contain the proper evaluation on pixel level, as that
would need the Pascal VOC 2010 dataset.
 N/A numpy np N/A N/A N/A cPickle pickle N/A N/A N/A ImportError N/A N/A pickle pystruct learners N/A pystruct.models crfs pystruct.utils SaveLogger N/A data_train N/A N/A pickle load N/A open data_train_dict.pickle N/A C 0.01 N/A n_states 21 N/A N/A number of samples: %s N/A len N/A data_train N/A X N/A class_weights N/A 1.0 N/A N/A np bincount N/A N/A np hstack N/A data_train N/A Y N/A class_weights N/A 21.0 N/A N/A np sum class_weights N/A class_weights N/A model N/A N/A crfs EdgeFeatureGraphCRF inference_method qpbo class_weight class_weights symmetric_edge_features N/A 0 1 antisymmetric_edge_features N/A 2 N/A experiment_name N/A edge_features_one_slack_trainval_%f C N/A ssvm N/A N/A learners NSlackSSVM model verbose 2 C C max_iter 100000 n_jobs -1 tol 0.0001 show_loss_every 5 logger N/A SaveLogger N/A experiment_name .pickle save_every 100 inactive_threshold 0.001 inactive_window 10 batch_size 100 N/A N/A N/A ssvm fit N/A data_train N/A X N/A data_train N/A Y N/A data_val N/A N/A pickle load N/A open data_val_dict.pickle N/A y_pred N/A N/A ssvm predict N/A data_val N/A X N/A N/A y_pred y_true N/A N/A N/A np hstack y_pred N/A N/A np hstack N/A data_val N/A Y N/A y_pred N/A y_pred N/A N/A y_true 255 N/A y_true N/A y_true N/A N/A y_true 255 N/A N/A Score on validation set: %f N/A N/A np mean N/A y_true y_pred