spencer-project / spencer_people_tracking

Multi-modal ROS-based people detection and tracking framework for mobile robots developed within the context of the EU FP7 project SPENCER.
http://www.spencer.eu/
656 stars 326 forks source link

Random Forest Laser Detector Parameters #99

Open FullMetalNicky opened 3 years ago

FullMetalNicky commented 3 years ago

I am running the noetic branch with ROS Noetic on Ubuntu 20.04. I noticed that when I train and test in the same program run, I get good results for the random forest laser detector, but when I load a trained model I get garbage.

My model was trained with: rf_num_trees 15 rf_max_depth 10 But when I load it, I see that m_randomForest->getTermCriteria().maxCount is 50, instead of 15.

I noticed that in the function RandomForestDetector::trainOnFeatures the ROS parameters are considered. But if I load a detector model from a file and then attempt to classify - those parameters are not considered. I am now getting the ROS params in the constructor, which seems to fix this issue.

Can you look into it, and tell me if I am doing something incorrectly?