@ -275,6 +275,8 @@ int main(int argc, char* argv[]) {
if ( bb_regressor_model_opt_wrapped . has_value ( ) & & resnet_outputs . count ( " layer2 " ) & & resnet_outputs . count ( " layer3 " ) ) {
if ( bb_regressor_model_opt_wrapped . has_value ( ) & & resnet_outputs . count ( " layer2 " ) & & resnet_outputs . count ( " layer3 " ) ) {
try {
try {
std : : cout < < " Processing BBRegressor for sample " < < i < < std : : endl ;
std : : cout < < " Processing BBRegressor for sample " < < i < < std : : endl ;
// Remove debug_get_conv3_1t_output and debug_get_conv4_1t_output calls (they do not exist)
// The correct BBRegressor logic is:
std : : vector < torch : : Tensor > backbone_feats_for_bb = {
std : : vector < torch : : Tensor > backbone_feats_for_bb = {
resnet_outputs [ " layer2 " ] . clone ( ) ,
resnet_outputs [ " layer2 " ] . clone ( ) ,
resnet_outputs [ " layer3 " ] . clone ( )
resnet_outputs [ " layer3 " ] . clone ( )
@ -294,14 +296,6 @@ int main(int argc, char* argv[]) {
} else {
} else {
std : : cerr < < " Skipping BBRegressor predict_iou for sample " < < i < < " (iou_feats or mod_vectors empty). " < < std : : endl ;
std : : cerr < < " Skipping BBRegressor predict_iou for sample " < < i < < " (iou_feats or mod_vectors empty). " < < std : : endl ;
}
}
// Save debug intermediate outputs
torch : : Tensor cpp_conv3_1t_out = ( * bb_regressor_model_opt_wrapped ) . debug_get_conv3_1t_output ( resnet_outputs [ " layer2 " ] . clone ( ) ) ;
save_tensor_to_file ( cpp_conv3_1t_out , ( bb_reg_out_dir / ( sample_suffix + " _debug_conv3_1t_output.pt " ) ) . string ( ) ) ;
torch : : Tensor cpp_conv4_1t_out = ( * bb_regressor_model_opt_wrapped ) . debug_get_conv4_1t_output ( resnet_outputs [ " layer3 " ] . clone ( ) ) ;
save_tensor_to_file ( cpp_conv4_1t_out , ( bb_reg_out_dir / ( sample_suffix + " _debug_conv4_1t_output.pt " ) ) . string ( ) ) ;
std : : cout < < " BBRegressor processing done for sample " < < i < < std : : endl ;
std : : cout < < " BBRegressor processing done for sample " < < i < < std : : endl ;
} catch ( const std : : exception & e ) {
} catch ( const std : : exception & e ) {
std : : cerr < < " Error during BBRegressor processing for sample " < < i < < " : " < < e . what ( ) < < std : : endl ;
std : : cerr < < " Error during BBRegressor processing for sample " < < i < < " : " < < e . what ( ) < < std : : endl ;