Skip to content

Commit 58eff79

Browse files
authored
Update CLI-COMMANDS.md
1 parent 644cec0 commit 58eff79

File tree

1 file changed

+124
-0
lines changed

1 file changed

+124
-0
lines changed

CLI-COMMANDS.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# The roboflow-python command line
2+
This has the same capabilities of the [roboflow node cli](https://www.npmjs.com/package/roboflow-cli) so that our users don't need to install two different tools.
3+
14
## See available commands
25

36
```bash
@@ -101,3 +104,124 @@ drwxr-xr-x@ 60 tony staff 1.9K Jan 5 10:32 test
101104
drwxr-xr-x@ 1214 tony staff 38K Jan 5 10:32 train
102105
drwxr-xr-x@ 118 tony staff 3.7K Jan 5 10:32 valid
103106
```
107+
108+
## Example: list workspaces
109+
List the workspaces you have access to
110+
111+
```bash
112+
$ roboflow workspace list
113+
```
114+
115+
```
116+
tonyprivate
117+
link: https://app.roboflow.com/tonyprivate
118+
id: tonyprivate
119+
120+
wolfodorpythontests
121+
link: https://app.roboflow.com/wolfodorpythontests
122+
id: wolfodorpythontests
123+
124+
test minimize
125+
link: https://app.roboflow.com/test-minimize
126+
id: test-minimize
127+
```
128+
129+
## Example: get workspace details
130+
131+
```bash
132+
$ roboflow workspace get tonyprivate
133+
```
134+
135+
```
136+
{
137+
"workspace": {
138+
"name": "tonyprivate",
139+
"url": "tonyprivate",
140+
"members": 4,
141+
"projects": [
142+
{
143+
"id": "tonyprivate/annotation-upload",
144+
"type": "object-detection",
145+
"name": "annotation-upload",
146+
"created": 1685199749.708,
147+
"updated": 1695910515.48,
148+
"images": 1,
149+
(...)
150+
}
151+
]
152+
}
153+
}
154+
```
155+
156+
## Example: list projects
157+
158+
```bash
159+
roboflow project list -w tonyprivate
160+
```
161+
```
162+
annotation-upload
163+
link: https://app.roboflow.com/tonyprivate/annotation-upload
164+
id: tonyprivate/annotation-upload
165+
type: object-detection
166+
versions: 0
167+
images: 1
168+
classes: dict_keys(['0', 'Rabbits1', 'Rabbits2', 'minion1', 'minion0', '5075E'])
169+
170+
hand-gestures
171+
link: https://app.roboflow.com/tonyprivate/hand-gestures-fsph8
172+
id: tonyprivate/hand-gestures-fsph8
173+
type: object-detection
174+
versions: 5
175+
images: 387
176+
classes: dict_keys(['zero', 'four', 'one', 'two', 'five', 'three', 'Guard'])
177+
```
178+
179+
## Example: get project details
180+
181+
```bash
182+
roboflow project get -w tonyprivate annotation-upload
183+
```
184+
```
185+
{
186+
"workspace": {
187+
"name": "tonyprivate",
188+
"url": "tonyprivate",
189+
"members": 4
190+
},
191+
"project": {
192+
"id": "tonyprivate/annotation-upload",
193+
"type": "object-detection",
194+
"name": "annotation-upload",
195+
"created": 1685199749.708,
196+
"updated": 1695910515.48,
197+
"images": 1,
198+
(...)
199+
},
200+
"versions": []
201+
}
202+
```
203+
204+
## Example: run inference
205+
206+
If your project has a trained model (or you are using a dataset from Roboflow Universe that has a trained model), you can run inference from the command line.
207+
208+
Let's use [Rock-Paper-Scissors sample public dataset]([url](https://universe.roboflow.com/roboflow-58fyf/rock-paper-scissors-sxsw/model/11)) from Roboflow universe
209+
210+
(In my case, `~/scissors.png` is me holding two fingers to the camera, you can use your own image file ;-))
211+
212+
```bash
213+
roboflow infer -w roboflow-58fyf -m rock-paper-scissors-sxsw/11 ~/scissors.png
214+
```
215+
```
216+
{
217+
"x": 1230.0,
218+
"y": 814.5,
219+
"width": 840.0,
220+
"height": 1273.0,
221+
"confidence": 0.8817358016967773,
222+
"class": "Scissors",
223+
"class_id": 2,
224+
"image_path": "/Users/tony/scissors.png",
225+
"prediction_type": "ObjectDetectionModel"
226+
}
227+
```

0 commit comments

Comments
 (0)