Computer Vision News - April 2016
Tool Pipeline system for Octave and Matlab (PSOM) You probably have experienced this situation: you are developing a new, complex multistage computer vision algorithm in Matlab (or any other function). The algorithms are composed of several stages (sequential or parallel). If the need arises to make a change in one stage in the middle of the algorithms, one has to run the entire code anew, despite the fact that only a small part of it was changed. Does it sound familiar? For anyone involved in developing code and algorithms, this is no infrequent occurrence. The need to change part of the code can arise from a wide variety of reasons. Some are due to modifications in the pre-existing algorithm, others may be required by new stages that were added to the algorithm later on, while others yet may have to do with solving bugs in the program. This frequent code modification leads to re-running the code, over and over, starting from the beginning again and wasting a lot of time in the development process. Don’t worry - the PSOM package has come to the rescue! PSOM is an open-source software for Matlab & Octave distributed under MIT license: • It tracks the code with the ability to identify failed or modified stages and run only these • It keeps a clear, detailed log and provides detailed diagnostics • It automatically identifies stages of the code that are independent of one another and can run them simultaneously COMPUTER VISION NEWS 8 To show you how this works, we will use the following Matlab toy example: 1. a = randn([10 1]); 2. b = a.^2; 3. c = a.^3 4. d = b+c In this code we generate a vector of 10 random numbers (line 1). We then Squared up vector the series of numbers (line 2), and Cubed it up (line 3). At the end, we sum up the Squared the Cubed vectors (line 4). Note that line 2 and 3 are independent, as shown in the figure at the right (the graph was created by PSOM. Soon we will show you how this was done). To put this small piece of code into the PSOM pipeline we first need to understand some of the terminology that PSOM is using. In PSOM each step in the pipeline is describing one job. Job includes the following subfields: (1) Command describes the Matlab/octave command line(s) executed by the job. (2) opt (optional) contains any variable that is used by the job. (3) files_in and files_out (optional) respectively describe the lists of input and output files, using either a string, a cell of strings or a nested structure whose terminal fields are strings/cell of strings. The following is the PSOM code for the above code sample:
Made with FlippingBook
RkJQdWJsaXNoZXIy NTc3NzU=