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

about the readRLEfile script #22

Open
KnightOfTheMoonlight opened this issue Sep 15, 2017 · 4 comments
Open

about the readRLEfile script #22

KnightOfTheMoonlight opened this issue Sep 15, 2017 · 4 comments

Comments

@KnightOfTheMoonlight
Copy link

KnightOfTheMoonlight commented Sep 15, 2017

Dear Shuran,
Thanks for your awesome work. And I have one question about the readRLEfile function.

checkVox = [];
parfor RLEIdx = 1:(length(checkVoxRLE)/2)
    fprintf('Checking RLE: %d/%d\n',RLEIdx,length(checkVoxRLE)/2);
    checkVoxVal  = checkVoxRLE(RLEIdx*2-1);
    checkVoxIter = checkVoxRLE(RLEIdx*2);
    checkVox = [checkVox,repmat(checkVoxVal,1,checkVoxIter)];
end

As above, checkVox should be the voxel data, and you use parfor for parallel the decoding code. However, I really can't get the idea of how to parellel this line: checkVox = [checkVox,repmat(checkVoxVal,1,checkVoxIter)];. As checkVoxVal, checkwriter are variable, so you need to put the repmat(checkVoxVal,1,checkVoxIter) part in order, but if your use parfor it should be paralleled, right? So there's no order at all. Is it weird?

@KnightOfTheMoonlight
Copy link
Author

Btw, I'm trying to change this to python. At present, I find my python code takes quite a long time (7mins/file) that your original matlab code. At present, I think this parfor part is the reason. And when I'm trying to understand it, I find the above question.

@KnightOfTheMoonlight KnightOfTheMoonlight changed the title about readRLEfile script about the readRLEfile script Sep 15, 2017
@mgarbade
Copy link

I've converted the data reading part of RLE files into boost python. Still uses GPU and C++ the code is simply interfaced to be accessible in python. You can check out my code here.

Takes 3 seconds / file (including calculating the TSDF so the file is then ready for the network)

@KnightOfTheMoonlight
Copy link
Author

KnightOfTheMoonlight commented Sep 24, 2017

@mgarbade Thanks for your sharing! I have made some changes for my code and now it just takes secs to read one file. Here is my code here

@charlesCXK
Copy link

Thank you both very much ! I am in trouble when processing the '.bin' file to get the Ground Truth. Thanks for your sharing, and I will try it.

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

No branches or pull requests

3 participants