BertaBescos / DynaSLAM

DynaSLAM is a SLAM system robust in dynamic environments for monocular, stereo and RGB-D setups
https://bertabescos.github.io/DynaSLAM/
Other
829 stars 201 forks source link

Could you give me an example of Mask, Maskdil and Mask after minus Maskdil? #63

Closed linpeisensh closed 3 years ago

linpeisensh commented 3 years ago

@BertaBescos Thank you for your excellent work! 1.Could you give me an example of Mask, Maskdil and Mask after minus Maskdil from this code in line 97 of Examples/Stereo/stereo_kitti.cc?

if (argc == 5){
            cv::Mat maskLeftRCNN, maskRightRCNN;
            maskLeftRCNN = MaskNet->GetSegmentation(imLeft, string(argv[4])+"/imLeft",
                    vstrImageLeft[ni].replace(vstrImageLeft[ni].begin(), vstrImageLeft[ni].end() - 10,""));
            maskRightRCNN = MaskNet->GetSegmentation(imRight, string(argv[4])+"/imRight",
                    vstrImageRight[ni].replace(vstrImageRight[ni].begin(), vstrImageRight[ni].end() - 10,""));
            cv::Mat maskLeftRCNNdil = maskLeftRCNN.clone();
            cv::dilate(maskLeftRCNN, maskLeftRCNNdil, kernel);
            maskLeft = maskLeft - maskLeftRCNNdil;
            cv::Mat maskRightRCNNdil = maskRightRCNN.clone();
            cv::dilate(maskRightRCNN, maskRightRCNNdil, kernel);
            maskRight = maskRight - maskRightRCNNdil;
        }

I try to run it, but my CUDA version is 11.x, it is very hard to work with tensorflow 1.x. 2.Is it possible run segmentation part with CPU?