You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,31 +26,32 @@ Whether you're deploying in the cloud or on edge devices, the Focoos Python SDK
26
26
Deploy the model on your devices or use it on our servers. Download the model to run it locally, without sending any data over the network, ensuring full privacy.
27
27
28
28
29
-
###Quickstart 🚀
29
+
## Quickstart 🚀
30
30
Ready to dive in? Get started with the setup in just a few simple steps!
31
31
32
+
### Installation
32
33
**Install** the Focoos Python SDK (for more options, see [setup](https://focoosai.github.io/focoos/setup))
🚀 [Directly use](https://focoosai.github.io/focoos/how_to/inference/) our **Efficient Models**, optimized for different data, applications, and hardware.
Copy file name to clipboardExpand all lines: docs/how_to/cloud_training.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This section covers the steps to create a model and train it in the cloud using the `focoos` library. The following example demonstrates how to interact with the Focoos API to manage models, datasets, and training jobs.
4
4
5
-
[](https://colab.research.google.com/github/FocoosAI/focoos/blob/documentation%2Fnomenclature/notebooks/training.ipynb)
5
+
[](https://colab.research.google.com/github/FocoosAI/focoos/blob/main/notebooks/training.ipynb)
6
6
7
7
In this guide, we will perform the following steps:
8
8
@@ -17,7 +17,7 @@ In this guide, we will perform the following steps:
17
17
## 1. Load or select a dataset
18
18
!!! note
19
19
Currently, we are not supporting dataset creation from the SDK (it's coming really soon) and you can only use a dataset already available on the platform.
20
-
To upload your own dataset, you can write us a mail to [info@focoos.ai](mailto:info@focoos.ai) and we will load your dataset on the platform on your private workspace (your data will not be shared with anyone and not used for any other purpose than training your model).
20
+
To upload your own dataset, you can write us a mail to [support@focoos.ai](mailto:support@focoos.ai) and we will load your dataset on the platform on your private workspace (your data will not be shared with anyone and not used for any other purpose than training your model).
21
21
22
22
You can list all available datasets using the following code:
The first step to personalize your model is to create a model.
39
-
You can create a model by calling the [`new_model` method](/api/focoos/#focoos.Focoos.new_model) on the `Focoos` object. You can choose the model you want to personalize from the list of [Focoos Models](/models) available on the platform. Make sure to select the correct model for your task.
39
+
You can create a model by calling the [`new_model` method](/focoos/api/focoos/#focoos.focoos.Focoos.new_model) on the `Focoos` object. You can choose the model you want to personalize from the list of [Focoos Models](../models.md) available on the platform. Make sure to select the correct model for your task.
40
40
41
41
```python
42
42
from focoos import Focoos
@@ -57,10 +57,10 @@ model = focoos.new_model(
57
57
focoos_model="fai-rtdetr-m-obj365",
58
58
)
59
59
```
60
-
This function will return a new [`RemoteModel`](/api/remote_model) object that you can use to train the model and to perform remote inference.
60
+
This function will return a new [`RemoteModel`](/focoos/api/remote_model/#focoos.remote_model.RemoteModel) object that you can use to train the model and to perform remote inference.
61
61
62
62
## 3. Train the model
63
-
Once the model is created, you can start the training process by calling the [`train` method](/api/remote_model/#focoos.remote_model.RemoteModel.train) on the model object.
63
+
Once the model is created, you can start the training process by calling the [`train` method](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.train) on the model object.
64
64
65
65
```python
66
66
from focoos.ports import Hyperparameters
@@ -75,42 +75,42 @@ res = model.train(
75
75
)
76
76
```
77
77
For selecting the `dataset_ref` see the [step 1](#1-load-or-select-a-dataset).
78
-
You can further customize the training process by passing additional parameters to the [`train` method](/api/remote_model/#focoos.remote_model.RemoteModel.train) (such as the instance type, the volume size, the maximum runtime, etc.) or use additional hyperparameters (see the list [available hyperparameters](/api/ports/#focoos.ports.Hyperparameters)).
78
+
You can further customize the training process by passing additional parameters to the [`train` method](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.train) (such as the instance type, the volume size, the maximum runtime, etc.) or use additional hyperparameters (see the list [available hyperparameters](/focoos/api/ports/#focoos.ports.Hyperparameters)).
79
79
80
-
Futhermore, you can monitor the training progress by polling the training status. Use the [`notebook_monitor_train`](/api/remote_model/#focoos.remote_model.RemoteModel.notebook_monitor_train) method on a jupyter notebook:
80
+
Futhermore, you can monitor the training progress by polling the training status. Use the [`notebook_monitor_train`](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.notebook_monitor_train) method on a jupyter notebook:
You can also get the training logs by calling the [`train_logs` method](/api/remote_model/#focoos.remote_model.RemoteModel.train_logs):
85
+
You can also get the training logs by calling the [`train_logs` method](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.train_logs):
86
86
```python
87
87
logs = model.train_logs()
88
88
pprint(logs)
89
89
```
90
90
91
-
Finally, if for some reason you need to cancel the training, you can do so by calling the [`stop_training` method](/api/remote_model/#focoos.remote_model.RemoteModel.stop_training):
91
+
Finally, if for some reason you need to cancel the training, you can do so by calling the [`stop_training` method](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.stop_training):
92
92
```python
93
93
model.stop_training()
94
94
```
95
95
96
96
## 4. Visualize training metrics
97
-
You can visualize the training metrics by calling the [`metrics` method](/api/remote_model/#focoos.remote_model.RemoteModel.metrics):
97
+
You can visualize the training metrics by calling the [`metrics` method](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.metrics):
98
98
```python
99
99
metrics = model.metrics()
100
100
visualizer = MetricsVisualizer(metrics)
101
101
visualizer.log_metrics()
102
102
```
103
-
The function will return an object of type [`Metrics`](/api/ports/#focoos.ports.Metrics) that you can use to visualize the training metrics using a `MetricsVisualizer` object.
103
+
The function will return an object of type [`Metrics`](/focoos/api/ports/#focoos.ports.Metrics) that you can use to visualize the training metrics using a `MetricsVisualizer` object.
104
104
105
-
On notebooks, you can also plot the metrics by calling the [`notebook_plot_training_metrics`](/api/remote_model/#focoos.remote_model.RemoteModel.notebook_plot_training_metrics) method:
105
+
On notebooks, you can also plot the metrics by calling the [`notebook_plot_training_metrics`](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.notebook_plot_training_metrics) method:
106
106
```python
107
107
visualizer.notebook_plot_training_metrics()
108
108
```
109
109
110
110
## 5. Test your model
111
111
112
112
### Remote Inference
113
-
Once the training is over, you can test your model using remote inference by calling the [`infer` method](/api/remote_model/#focoos.remote_model.RemoteModel.infer) on the model object.
113
+
Once the training is over, you can test your model using remote inference by calling the [`infer` method](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.infer) on the model object.
114
114
115
115
```python
116
116
image_path ="<PATH-TO-YOUR-IMAGE>"
@@ -122,7 +122,7 @@ for det in result.detections:
122
122
if det.mask:
123
123
print("Instance segmentation mask included")
124
124
```
125
-
`result` is a [FocoosDetections](/api/ports/#focoos.ports.FocoosDetections) object, containing a list of [FocoosDet](/api/ports/#focoos.ports.FocoosDet) objects and optionally a dict of information about the latency of the inference.
125
+
`result` is a [FocoosDetections](/focoos/api/ports/#focoos.ports.FocoosDetections) object, containing a list of [FocoosDet](/focoos/api/ports/#focoos.ports.FocoosDet) objects and optionally a dict of information about the latency of the inference.
126
126
127
127
The `threshold` parameter is optional and defines the minimum confidence score for a detection to be considered valid (predictions with a confidence score lower than the threshold are discarded).
128
128
@@ -136,9 +136,9 @@ preview = Image.fromarray(preview[:,:,[2,1,0]]) # invert to make it RGB
136
136
137
137
### Local Inference
138
138
!!! Note
139
-
To perform local inference, you need to install the package with one of the extra modules (`[cpu]`, `[torch]`, `[cuda]`, `[tensorrt]`). See the [installation](./setup.md) page for more details.
139
+
To perform local inference, you need to install the package with one of the extra modules (`[cpu]`, `[torch]`, `[cuda]`, `[tensorrt]`). See the [installation](../setup.md) page for more details.
140
140
141
-
You can perform inference locally by getting the [`LocalModel`](/api/local_model) you already trained and calling the [`infer` method](/api/local_model/#focoos.local_model.LocalModel.infer) on your image. If it's the first time you run the model locally, the model will be downloaded from the cloud and saved on your machine. Additionally, if you use CUDA or TensorRT, the model will be optimized for your GPU before running the inference (it can take few seconds, especially for TensorRT).
141
+
You can perform inference locally by getting the [`LocalModel`](/focoos/api/local_model) you already trained and calling the [`infer` method](/focoos/api/local_model/#focoos.local_model.LocalModel.infer) on your image. If it's the first time you run the model locally, the model will be downloaded from the cloud and saved on your machine. Additionally, if you use CUDA or TensorRT, the model will be optimized for your GPU before running the inference (it can take few seconds, especially for TensorRT).
142
142
143
143
```python
144
144
model = focoos.get_local_model(model.model_ref) # get the local model
Copy file name to clipboardExpand all lines: docs/how_to/dashboard.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This section covers the steps to monitor the status of your models on the FocoosAI platform.
4
4
5
-
[](https://colab.research.google.com/github/FocoosAI/focoos/blob/documentation%2Fnomenclature/notebooks/model_management.ipynb)
5
+
[](https://colab.research.google.com/github/FocoosAI/focoos/blob/main/notebooks/model_management.ipynb)
6
6
7
7
## How to list the Focoos Models
8
8
To list all the models available on the FocoosAI platform, you can use the following code:
@@ -22,14 +22,14 @@ for model in models:
22
22
23
23
24
24
```
25
-
`models` is a list of [`ModelPreview`](/api/ports/#focoos.ports.ModelPreview) objects that contains the following information:
25
+
`models` is a list of [`ModelPreview`](/focoos/api/ports/#focoos.ports.ModelPreview) objects that contains the following information:
26
26
27
27
-`name`: The name of the model.
28
28
-`ref`: The reference of the model.
29
29
-`status`: The status of the model.
30
30
-`task`: The task of the model.
31
31
-`description`: The description of the model.
32
-
-`status`: The status of the model, which indicates its current state (e.g. CREATED, TRAINING_RUNNING, TRAINING_COMPLETED - see [`ModelStatus`](/api/ports/#focoos.ports.ModelStatus)).
32
+
-`status`: The status of the model, which indicates its current state (e.g. CREATED, TRAINING_RUNNING, TRAINING_COMPLETED - see [`ModelStatus`](/focoos/api/ports/#focoos.ports.ModelStatus)).
33
33
34
34
## How to list all your models
35
35
To list all your models, the library provides a `list_models` function. This function will return a list of `Model` objects.
@@ -50,18 +50,18 @@ for model in models:
50
50
print("-"*50)
51
51
52
52
```
53
-
`models` is a list of [`ModelPreview`](/api/ports/#focoos.ports.ModelPreview) objects that contains the following information:
53
+
`models` is a list of [`ModelPreview`](/focoos/api/ports/#focoos.ports.ModelPreview) objects that contains the following information:
54
54
55
55
-`name`: The name of the model.
56
56
-`ref`: The reference of the model.
57
57
-`status`: The status of the model.
58
58
-`task`: The task of the model.
59
59
-`description`: The description of the model.
60
60
-`focoos_model`: The starting Focoos Model used for training.
61
-
-`status`: The status of the model, which indicates its current state (e.g. CREATED, TRAINING_RUNNING, TRAINING_COMPLETED - see [`ModelStatus`](/api/ports/#focoos.ports.ModelStatus)).
61
+
-`status`: The status of the model, which indicates its current state (e.g. CREATED, TRAINING_RUNNING, TRAINING_COMPLETED - see [`ModelStatus`](/focoos/api/ports/#focoos.ports.ModelStatus)).
62
62
63
63
## See the metrics for a model
64
-
To see the validation metrics of a model, you can use the [`metrics` method](/api/remote_model/#focoos.remote_model.RemoteModel.metrics) on the model object.
64
+
To see the validation metrics of a model, you can use the [`metrics` method](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.metrics) on the model object.
65
65
66
66
```python
67
67
from focoos import Focoos
@@ -87,10 +87,10 @@ if metrics.train_metrics:
87
87
print(f"{k}: {v}")
88
88
89
89
```
90
-
`metrics` is a [`Metrics`](/api/ports/#focoos.ports.Metrics) object that contains the validation metrics of the model.
90
+
`metrics` is a [`Metrics`](/focoos/api/ports/#focoos.ports.Metrics) object that contains the validation metrics of the model.
91
91
92
92
## Delete a model
93
-
To delete a model, you can use the [`delete_model` method](/api/remote_model/#focoos.remote_model.RemoteModel.delete_model) on the model object.
93
+
To delete a model, you can use the [`delete_model` method](/focoos/api/remote_model/#focoos.remote_model.RemoteModel.delete_model) on the model object.
94
94
95
95
!!! warning
96
96
This action is irreversible and the model will be deleted forever from the platform.
@@ -122,7 +122,7 @@ for dataset in datasets:
122
122
print("-" * 50)
123
123
124
124
```
125
-
`datasets` is a list of [`DatasetMetadata`](../../api/ports/#focoos.ports.DatasetMetadata) objects that contains the following information:
125
+
`datasets` is a list of [`DatasetMetadata`](/focoos/api/ports/#focoos.ports.DatasetMetadata) objects that contains the following information:
0 commit comments