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
Hi,
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