insightface icon indicating copy to clipboard operation
insightface copied to clipboard

Remove print in model zoo

Open jonatansalemes opened this issue 1 year ago • 7 comments

https://github.com/deepinsight/insightface/blob/c2db41402c627cab8ea32d55da591940f2258276/python-package/insightface/model_zoo/model_zoo.py#L41

jonatansalemes avatar Nov 28 '23 17:11 jonatansalemes

there are many prints in the code, can we cleanup all, changing to log maybe ?

jonatansalemes avatar Nov 28 '23 17:11 jonatansalemes

Actually this print is informative, this way is clear if you use GPU or CPU or etc...

Neptune-Trojans avatar Dec 12 '23 09:12 Neptune-Trojans

no problem with prints, im talking about change to log instead print to stdout directly

jonatansalemes avatar Dec 12 '23 11:12 jonatansalemes

@jslsolucoes Try this https://docs.python.org/zh-tw/3.8/library/contextlib.html#contextlib.redirect_stdout

changchiyou avatar Jan 10 '24 08:01 changchiyou

@jslsolucoes Try this https://docs.python.org/zh-tw/3.8/library/contextlib.html#contextlib.redirect_stdout

no thanks, i dont want redirect stoud as workaround, best way is for sure using log library, makes no sense deal this way with the problem

jonatansalemes avatar Jan 10 '24 15:01 jonatansalemes

@jslsolucoes

  1. Fork this repo and edit by yourself
  2. Redirect only the stdout output specifically from insightface (https://loguru.readthedocs.io/en/stable/resources/recipes.html#capturing-standard-stdout-stderr-and-warnings)

changchiyou avatar Jan 11 '24 02:01 changchiyou

why not to use logging? that way give us to output desired logging level.

ycuk avatar Feb 21 '24 13:02 ycuk