mmagic icon indicating copy to clipboard operation
mmagic copied to clipboard

Dataset preprocessing scripts cannot input int type

Open SingleZombie opened this issue 2 years ago • 1 comments

In the super-resolution dataset preprocessing scripts (take tools\data\super-resolution\div2k\preprocess_div2k_dataset.py as an example), the cmd parser is defined as follows:

    parser.add_argument(
        '--n-thread',
        nargs='?',
        default=20,
        help='thread number when using multiprocessing')

where the type of the argument is not set. These args will be parsed as str even if int is given. Seems the function misses type=int.

PS:

  1. The default n-thread is set to 20, which may cause lack of memory on most personal computers. I suggest setting a lower number (maybe 4 or 8 is better).
  2. Seems the script cannot create an annotation file(https://mmediting.readthedocs.io/en/latest/_tmp/sr_datasets.html#prepare-annotation-list). Adding an annotation creator will be helpful.

Thanks for the help.

SingleZombie avatar Apr 04 '22 09:04 SingleZombie

Thanks for your advice, @SingleZombie

Yeah, adding type=int and setting a lower number will be better.

Besides, Adding an annotation creator will be helpful.

Now, shall we achieve the above improvements together? Do you want to achieve these through PR(s)?

Yshuo-Li avatar Apr 26 '22 08:04 Yshuo-Li

Hi @SingleZombie, Would you like to contribute this feature by creating a new PR?

@LeoXing1996 , please track this issue.

zengyh1900 avatar Oct 09 '22 11:10 zengyh1900