error: unrecognized arguments TRUE

I want create .rec file (ubuntu 18)
So i have
then traim with .lst
i do so

python /home/Downloads/ /home/Downloads/train ’ --center-crop True --resize 224 --pack-label True
and then get this error error: unrecognized arguments TRUE
How to fix it?

pencv@opencv-virtual-machine:~$ python /home/opencv/Downloads/ /home/opencv/train . --resize 224 --pack-label True
usage: [-h] [–list] [–exts EXTS [EXTS …]] [–chunks CHUNKS]
[–train-ratio TRAIN_RATIO] [–test-ratio TEST_RATIO]
[–recursive] [–no-shuffle] [–pass-through]
[–resize RESIZE] [–center-crop] [–quality QUALITY]
[–num-thread NUM_THREAD] [–color {-1,0,1}]
[–encoding {.jpg,.png}] [–pack-label]
prefix root error: unrecognized arguments: True

my file taken from , i didn’t edit it

You just have to specify the flag - no need to include True. This will work for your first example:

python /home/Downloads/ /home/Downloads/train --center-crop --resize 224 --pack-label

If not specified, then it’s taken to be false.


1 Like