Module Import alias Import alias Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Print Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call NameLoad NameLoad
N/A N/A os N/A sys N/A Hacky tool to convert file system layout of MCG boxes downloaded from
http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/mcg/
so that it's consistent with those computed by Jan Hosang (see:
http://www.mpi-inf.mpg.de/departments/computer-vision-and-multimodal-
  computing/research/object-recognition-and-scene-understanding/how-
  good-are-detection-proposals-really/)

NB: Boxes from the MCG website are in (y1, x1, y2, x2) order.
Boxes from Hosang et al. are in (x1, y1, x2, y2) order.
 munge N/A N/A src_dir N/A N/A N/A files N/A N/A os listdir src_dir N/A fn files N/A N/A N/A base ext N/A N/A N/A os path splitext fn N/A first N/A base N/A 14 N/A second N/A base N/A 22 N/A dst_dir N/A N/A N/A os path join MCG mat first second N/A N/A N/A N/A N/A os path exists dst_dir N/A N/A N/A N/A os makedirs dst_dir N/A src N/A N/A N/A os path join src_dir fn N/A dst N/A N/A N/A os path join dst_dir fn N/A N/A N/A MV: {} -> {} format src dst N/A N/A N/A os rename src dst N/A N/A N/A __name__ __main__ N/A N/A src_dir N/A N/A sys argv N/A 1 N/A N/A munge src_dir