mmagic
mmagic copied to clipboard
Dataset preprocessing scripts cannot input int type
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:
- 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).
- 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.
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)?
Hi @SingleZombie, Would you like to contribute this feature by creating a new PR?
@LeoXing1996 , please track this issue.