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

Trying to re-train planercnn with custom data #43

Open
rjose97 opened this issue May 29, 2020 · 3 comments
Open

Trying to re-train planercnn with custom data #43

rjose97 opened this issue May 29, 2020 · 3 comments

Comments

@rjose97
Copy link

rjose97 commented May 29, 2020

Hello friend,

Thanks a lot for your project.

I’m trying to do planar segmentation of single RGB image using your deep neural architecture but sometimes I don’t obtein good results. So, I’d like to re-train it, or train again, with some custom data, where I have plane parameters for each frame. However, I need the right segmentations for each plane. I can share with you my custom data in order to improve your final results.

@dLopes-SE
Copy link

dLopes-SE commented Jun 10, 2020

Hello @rjose97,

You should change ScanNet class in order to load your files and, instead of only loading one .npy file with all the planar equations in world coordinates (like PlaneRCNN does), you need to load a .npy or a .txt, in my case, for each frame.
Then you need to associate each segmentation to each plane, which is your question. You can do it with something like this:

newPlanes = []  
        newPlaneInfo = []
        newSegmentation = np.full(segmentation.shape, fill_value=-1)
        newIndex = 0

        for oriIndex, count in segmentList:
            # Non-planar label
            if oriIndex == 0:
                continue
                
            # Case plane does not exist (due to an error in Matlab)
            if np.amax(planes[oriIndex-1]) == 0:
                continue

            newPlanes.append(planes[oriIndex-1])   
            newSegmentation[segmentation == oriIndex] = newIndex
            #newPlaneInfo.append(self.plane_info[oriIndex] + [oriIndex])
            newIndex += 1
            continue

segmentation = newSegmentation
planes = np.array(newPlanes)
plane_info = newPlaneInfo   

Note: My data generator has an error is some unique frames, that's why I'm checking it.

I hope it was usefull, good luck.

Greetings,
Dylan Lopes, UC, Portugal.

@rjose97
Copy link
Author

rjose97 commented Jun 22, 2020

Thank you so much

@Karthikaddagadderamesh
Copy link

@dLopes-SE @rjose97 Hello I plan to use network to train on my own dataset. I already have a dataset which contains RGB images,semantic labels images and RGBD images. I would like to know if I could create planes and plane normal for my own dataset and use it.

Any information is welcomed
Thanks in advance

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