minor bug fix in TrainNetworks; changed threshold in CompareContours