I’m trying to use the Roboflow CLI to upload a folder of images and an annotation file. I’ve been able to upload the
valid folder via the web-based UI, but due to the amount of images in the
train one, I need to use the CLI.
I keep getting this error:
(base) nicholasarner@Nicholass-MacBook-Air stitch % cd /Users/nicholasarner/Downloads/Microsoft\ COCO
(base) nicholasarner@Nicholass-MacBook-Air Microsoft COCO % cd train
(base) nicholasarner@Nicholass-MacBook-Air train % roboflow upload *.jpg* -a _annotations.coco.json
zsh: argument list too long: roboflow
Interesting error. How big are the contents of the
train folder? Have you been able to upload images successfully via the SDK before?
Also, is there a reason for a second
roboflow upload *.jpg -a “[filename].xml”
This is the example code to upload all images and an annotation from Roboflow Docs
The second * was a typo
train folder has 116,410 images in it
This is the first time I’ve used the CLI
Did removing the * fix the issue or does it still persist?
Would it be possible to move a couple of pictures into a different folder to isolate if the number of images is the issue?
Hi Nick, the issue continued with less pictures?
That’s just a portion of of the photos; there’s actually quite a lot (the entirety of the coco dataset training folder)
Wildcard matching in CLI, as a general concept not specific to Roboflow, just extends the arguments of the command line to include every file that matches the wildcard. (Source)
The easiest solution is most likely to do a loop through all the files. Something like this should work:
for f in *.jpg; do roboflow upload "$f" -a "_annotations.coco.json"; done
I keep hitting enter when trying to select the project and that happens
I’m going to try to replicate the issue. Is it the regular COCO dataset? Do you have a Universe link?
Ah I can’t find the universe link now (Joseph would know; he was the one who sent it to me)