facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.22k stars 5.45k forks source link

How can I suppress the logging output in the console? #909

Open mirceast opened 5 years ago

mirceast commented 5 years ago

The title says it all, I would like to suppress the info printed in the console, in particular when creating a model with infer_engine.initialize_model_from_cfg.

The info I want to suppress looks like this:

INFO:detectron.utils.net:Loading weights from: model_final.pkl
INFO:detectron.utils.net:conv1_w loaded from weights file into gpu_0/conv1_w: (64, 3, 7, 7)
INFO:detectron.utils.net:res_conv1_bn_s loaded from weights file into gpu_0/res_conv1_bn_s: (64,)
INFO:detectron.utils.net:res_conv1_bn_b loaded from weights file into gpu_0/res_conv1_bn_b: (64,)

I know I could modify the net.py function but I'd like a solution that doesn't involve messing with Detectron's code.

Please excuse me if this is not related to Detectron per-se, as I am still quite new to Python.