Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting from strip_analysis, some video get "randomly" skipped and not analyzed for no reason => Joss #14

Closed
Josster opened this issue Jun 21, 2018 · 9 comments
Labels

Comments

@Josster
Copy link

Josster commented Jun 21, 2018

On several folders containing each on average 10 videos, there is each time 1-2 video not processed
for no apparent reason.

@Josster Josster added the bug label Jun 21, 2018
@Josster Josster changed the title Starting from strip_analysis, some video get skipped and not analyzed for no reason => Matt? Starting from strip_analysis, some video get "randomly" skipped and not analyzed for no reason => Matt? Jun 21, 2018
@mnagaoglu
Copy link
Member

mnagaoglu commented Jun 21, 2018 via email

@Josster
Copy link
Author

Josster commented Jun 21, 2018

It is unclear I am investigating. The skipped video, when ran again through ReVAS get normally analysed...
Some stat so far: Number of video Actually analysed/Total Number per folder
ail_os 26/27
4/12 (!)
4/18
5/6
5/6
21/24
8/9
4/9

Here is a logs from jxl on 3 folders
C:\Users\spencer\Google Drive\SELAB code\Joss\Fixation_letters\bugs
21/24=>3 videos skipped
8/9 =>1 skipped
4/9 => 5 [skipped]

@mnagaoglu
Copy link
Member

mnagaoglu commented Jun 21, 2018 via email

@Josster
Copy link
Author

Josster commented Jun 21, 2018

ok, I isolated two Errors:
Error1
Error while processing E:\bxh_os\VA Fix Expt\10Deg Field\2_20_2015_13_41\bxh_os_11_160_dwt_nostim_gamscaled_bandfilt.avi. Proceeding to next video.) Undefined function or variable 'beginNaNs'. CoarseRef(270) < ExecuteModules(143) < make_general_channel/channel_general(929) < remoteParallelFunction(38).

it is probably because we might read a video not starting nor Ending with NaNs.
hence the variable beginNaNs could be beginNaNs=[];
so in CoarseRef.m, the condition in line 270
if frameNumber < (1 + beginNaNs) || any(badFrames == frameNumber)
should be rewritten by
if isempty(beginNaNs) if frameNumber < (1 ) || any(badFrames == frameNumber) ... else if frameNumber < (1 + beginNaNs) || any(badFrames == frameNumber) ....

==> I will correct this

@Josster
Copy link
Author

Josster commented Jun 21, 2018

Error 2
Error while processing E:\jxl_os\VA Fix Expt\10Deg\Set III\jxl_os_4_dwt_nostim_gamscaled_bandfilt.avi. Proceeding to next video.) Reference to non-existent field 'stabilizeVideo'. MakeMontage(288) < FineRef(98) < ExecuteModules(169) < make_general_channel/channel_general(929) < remoteParallelFunction(38).

=>Error 2 solved by Mehmet and Joss

@Josster
Copy link
Author

Josster commented Jun 22, 2018

Update about Error 1: bug with 'beginNaNs' in CoarseRef
The bug style exist in the GUI mode (both with parallelisation or NOT), but I cannot reproduce it in command line, by putting a breakpoint on the line 270 or adding this line and putting a breakpoint in it

@Josster
Copy link
Author

Josster commented Jun 22, 2018

so here is my temporary fix before line 270 in CoarseRef.m :
if ~exist('beginNaNs','var')
beginNaNs=0;
end
if ~exist('beginNaNs','var')
endNaNs=0;
end

@Josster Josster changed the title Starting from strip_analysis, some video get "randomly" skipped and not analyzed for no reason => Matt? Starting from strip_analysis, some video get "randomly" skipped and not analyzed for no reason => Joss Jun 22, 2018
@mnagaoglu
Copy link
Member

What's the status on this issue? Did you temporary fix resolve the issue? If so, we can make it a temporary one.

By the way, I think the second if statement should be as follows, right? @Josster

if ~exist('endNaNs','var')
      endNaNs=0;
end

@mnagaoglu
Copy link
Member

mnagaoglu commented Nov 21, 2018

I solved the issue presumably in a more robust way by combining your method with also checking the value of beingNaNs and endNaNs when they do exist. Here it how it looks like:

try
        endNaNs = max(endNaNs1, endNaNs2);
        beginNaNs = max(beginNaNs1, beginNaNs2);
        if isempty(beginNaNs)
            beginNaNs = 0;
        end
        if isempty(endNaNs)
            beginNaNs = 0;
        end
    catch
        % just in case 
        if ~exist('beginNaNs','var')
              beginNaNs = 0;
        end
        if ~exist('endNaNs','var')
              endNaNs = 0;
        end
    end

Here is the link to the revision

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants