Skip to content

Commit fb4fa8b

Browse files
committed
Docs updates and version bump
1 parent d362ea7 commit fb4fa8b

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

CLI-COMMANDS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,26 @@ Uploading to existing project my-workspace/my-chess
126126
[UPLOADED] /home/jonny/tmp/chess/112_jpg.rf.1a6e7b87410fa3f787f10e82bd02b54e.jpg (7tWtAn573cKrefeg5pIO) / annotations = OK
127127
```
128128

129+
## Example: upload a single image
130+
131+
Upload a single image to a project, optionally with annotations, tags, and metadata:
132+
133+
```bash
134+
roboflow upload image.jpg -p my-project -s train
135+
```
136+
137+
Upload with custom metadata (JSON string):
138+
139+
```bash
140+
roboflow upload image.jpg -p my-project -M '{"camera_id":"cam001","location":"warehouse-3"}'
141+
```
142+
143+
Upload with annotation and tags:
144+
145+
```bash
146+
roboflow upload image.jpg -p my-project -a annotation.xml -t "outdoor,daytime" -s valid
147+
```
148+
129149
## Example: list workspaces
130150
List the workspaces you have access to
131151

docs/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,32 @@ Or from the CLI:
126126
roboflow search-export "class:person" -f coco -d my-project -l ./my-export
127127
```
128128

129+
### Upload with Metadata
130+
131+
Attach custom key-value metadata to images during upload:
132+
133+
```python
134+
project = workspace.project("my-project")
135+
136+
# Upload a local image with metadata
137+
project.upload(
138+
image_path="./image.jpg",
139+
metadata={"camera_id": "cam001", "location": "warehouse-3"},
140+
)
141+
142+
# Upload a hosted image with metadata
143+
project.upload(
144+
image_path="https://example.com/image.jpg",
145+
metadata={"camera_id": "cam002", "shift": "night"},
146+
)
147+
```
148+
149+
Or from the CLI:
150+
151+
```bash
152+
roboflow upload image.jpg -p my-project -M '{"camera_id":"cam001","location":"warehouse-3"}'
153+
```
154+
129155
## Library Structure
130156

131157
The Roboflow Python library is structured using the same Workspace, Project, and Version ontology that you will see in the Roboflow application.

roboflow/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from roboflow.models import CLIPModel, GazeModel # noqa: F401
1616
from roboflow.util.general import write_line
1717

18-
__version__ = "1.2.14"
18+
__version__ = "1.2.15"
1919

2020

2121
def check_key(api_key, model, notebook, num_retries=0):

0 commit comments

Comments
 (0)