Skip to content

Commit

Permalink
fixed links
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Jan 12, 2024
1 parent 25fdf9a commit 26c79a6
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 24 deletions.
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ See `luxonis_train --help` for more information.

The entire configuration is specified in a `yaml` file. This includes the model
structure, used losses, metrics, optimizers etc. For specific instructions and example
configuration files, see [Configuration](./configs/README.md).
configuration files, see [Configuration](https://github.com/luxonis/luxonis-train/blob/main/configs/README.md).

## Training

Expand All @@ -61,40 +61,47 @@ where key and value are space separated and sub-keys are dot (`.`) separated. If
## Tuning

To improve training performance you can use `Tuner` for hyperparameter optimization.
To use tuning, you have to specify [tuner](configs/README.md#tuner) section in the config file.
To use tuning, you have to specify [tuner](https://github.com/luxonis/luxonis-train/blob/main/configs/README.md#tuner) section in the config file.

To start the tuning, run

```bash
luxonis_train tune --config config.yaml
```

You can see an example tuning configuration [here](configs/example_tuning.yaml).
You can see an example tuning configuration [here](https://github.com/luxonis/luxonis-train/blob/main/configs/example_tuning.yaml).

## Exporting

We support export to `ONNX`, and `DepthAI .blob format` which is used for OAK cameras. By default, we export to `ONNX` format.

To use the exporter, you have to specify the [exporter](configs/README.md#exporter) section in the config file.
To use the exporter, you have to specify the [exporter](https://github.com/luxonis/luxonis-train/blob/main/configs/README.md#exporter) section in the config file.

Once you have the config file ready you can export the model using

```bash
luxonis_train export --config config.yaml
```

You can see an example export configuration [here](configs/example_export.yaml).
You can see an example export configuration [here](https://github.com/luxonis/luxonis-train/blob/main/configs/example_export.yaml).

## Customizations

We provide a registry interface through which you can create new [nodes](src/luxonis_train/nodes/README.md), [losses](src/luxonis_train/attached_modules/losses/README.md), [metrics](src/luxonis_train/attached_modules/metrics/README.md), [visualizers](src/luxonis_train/attached_modules/visualizers/README.md), [callbacks](src/luxonis_train/callbacks/README.md), [optimizers](configs/README.md#optimizer), and [schedulers](configs/README.md#scheduler).
We provide a registry interface through which you can create new
[nodes](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/nodes/README.md),
[losses](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/attached_modules/losses/README.md),
[metrics](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/attached_modules/metrics/README.md),
[visualizers](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/attached_modules/visualizers/README.md),
[callbacks](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/callbacks/README.md),
[optimizers](https://github.com/luxonis/luxonis-train/blob/main/configs/README.md#optimizer),
and [schedulers](https://github.com/luxonis/luxonis-train/blob/main/configs/README.md#scheduler).

Registered components can be then referenced in the config file. Custom components need to inherit from their respective base classes:

- Node - [BaseNode](src/luxonis_train/models/nodes/base_node.py)
- Loss - [BaseLoss](src/luxonis_train/attached_modules/losses/base_loss.py)
- Metric - [BaseMetric](src/luxonis_train/attached_modules/metrics/base_metric.py)
- Visualizer - [BaseVisualizer](src/luxonis_train/attached_modules/visualizers/base_visualizer.py)
- Node - [BaseNode](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/models/nodes/base_node.py)
- Loss - [BaseLoss](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/attached_modules/losses/base_loss.py)
- Metric - [BaseMetric](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/attached_modules/metrics/base_metric.py)
- Visualizer - [BaseVisualizer](https://github.com/luxonis/luxonis-train/blob/main/luxonis_train/attached_modules/visualizers/base_visualizer.py)
- Callback - [Callback from lightning.pytorch.callbacks](lightning.pytorch.callbacks)
- Optimizer - [Optimizer from torch.optim](https://pytorch.org/docs/stable/optim.html#torch.optim.Optimizer)
- Scheduler - [LRScheduler from torch.optim.lr_scheduler](https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate)
Expand Down Expand Up @@ -140,7 +147,7 @@ You have these options how to set up the environment variables:

- Using standard environment variables
- Specifying the variables in a `.env` file. If a variable is both in the environment and present in `.env` file, the exported variable takes precedense.
- Specifying the variables in the [ENVIRON](configs/README.md#environ) section of the config file. Note that this is not a recommended way. Variables defined in config take precedense over environment and `.env` variables.
- Specifying the variables in the [ENVIRON](https://github.com/luxonis/luxonis-train/blob/main/configs/README.md#environ) section of the config file. Note that this is not a recommended way. Variables defined in config take precedense over environment and `.env` variables.

### S3

Expand Down Expand Up @@ -186,4 +193,4 @@ If you want to contribute to the development, install the dev version of the pac
pip install luxonis-train[dev]
```

Consult the [Contribution guide](CONTRIBUTING.md) before making a pull request.
Consult the [Contribution guide](https://github.com/luxonis/luxonis-train/blob/main/CONTRIBUTING.md) before making a pull request.
10 changes: 5 additions & 5 deletions configs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ This is the most important block, that **must be always defined by the user**. T

### Nodes

For list of all nodes, see [nodes](src/luxonis_train/nodes/README.md).
For list of all nodes, see [nodes](../luxonis_train/nodes/README.md).

| Key | Type | Default value | Description |
| ------------- | ---- | ------------- | ---------------------------------------------------------------------------------------------------- |
Expand All @@ -82,7 +82,7 @@ Modules that are attached to a node. This include losses, metrics and visualzier
#### Losses

At least one node must have a loss attached to it.
You can see the list of all currently supported loss functions and their parameters [here](./src/luxonis_train/attached_modules/losses/README.md).
You can see the list of all currently supported loss functions and their parameters [here](../luxonis_train/attached_modules/losses/README.md).

| Key | Type | Default value | Description |
| ------ | ----- | ------------- | ---------------------------------------- |
Expand All @@ -91,7 +91,7 @@ You can see the list of all currently supported loss functions and their paramet
#### Metrics

In this section, you configure which metrics should be used for which node.
You can see the list of all currently supported metrics and their parameters [here](./src/luxonis_train/attached_modules/metrics/README.md).
You can see the list of all currently supported metrics and their parameters [here](../luxonis_train/attached_modules/metrics/README.md).

| Key | Type | Default value | Description |
| -------------- | ---- | ------------- | --------------------------------------------------------------------------------------- |
Expand All @@ -100,7 +100,7 @@ You can see the list of all currently supported metrics and their parameters [he
#### Visualizers

In this section, you configure which visualizers should be used for which node. Visualizers are responsible for creating images during training.
You can see the list of all currently supported visualizers and their parameters [here](./src/luxonis_train/attached_modules/visualizers/README.md).
You can see the list of all currently supported visualizers and their parameters [here](../luxonis_train/attached_modules/visualizers/README.md).

Visualizers have no specific configuration.

Expand Down Expand Up @@ -195,7 +195,7 @@ List of all optimizers can be found [here](https://pytorch.org/docs/stable/optim
### Callbacks

Callbacks sections contains a list of callbacks.
More information on callbacks and a list of available ones can be found [here](src/luxonis_train/callbacks/README.md)
More information on callbacks and a list of available ones can be found [here](../luxonis_train/callbacks/README.md)
Each callback is a dictionary with the following fields:

| Key | Type | Default value | Description |
Expand Down
10 changes: 5 additions & 5 deletions luxonis_train/attached_modules/visualizers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Visualizer for bounding boxes.

**Example**

![bbox_viz_example](../../../../media/example_viz/bbox.png)
![bbox_viz_example](https://github.com/luxonis/luxonis-train/blob/main/media/example_viz/bbox.png)

## KeypointVisualizer

Expand All @@ -40,7 +40,7 @@ Visualizer for bounding boxes.

**Example**

![kpt_viz_example](../../../../media/example_viz/kpts.png)
![kpt_viz_example](https://github.com/luxonis/luxonis-train/blob/main/media/example_viz/kpts.png)

## SegmentationVisualizer

Expand All @@ -53,7 +53,7 @@ Visualizer for bounding boxes.

**Example**

![seg_viz_example](../../../../media/example_viz/segmentation.png)
![seg_viz_example](https://github.com/luxonis/luxonis-train/blob/main/media/example_viz/segmentation.png)

## ClassificationVisualizer

Expand All @@ -68,7 +68,7 @@ Visualizer for bounding boxes.

**Example**

![class_viz_example](../../../../media/example_viz/class.png)
![class_viz_example](https://github.com/luxonis/luxonis-train/blob/main/media/example_viz/class.png)

## MultiVisualizer

Expand All @@ -84,4 +84,4 @@ Special type of meta-visualizer that combines several visualizers into one. The

Example of combining [KeypointVisualizer](#keypointvisualizer) and [BBoxVisualizer](#bboxvisualizer).

![multi_viz_example](../../../../media/example_viz/multi.png)
![multi_viz_example](https://github.com/luxonis/luxonis-train/blob/main/media/example_viz/multi.png)
4 changes: 2 additions & 2 deletions luxonis_train/callbacks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ List of supported callbacks from `lightning.pytorch`.
- [ LearningRateMonitor ](https://lightning.ai/docs/pytorch/stable/api/lightning.pytorch.callbacks.LearningRateMonitor.html#lightning.pytorch.callbacks.LearningRateMonitor)
- [ ModelCheckpoint ](https://lightning.ai/docs/pytorch/stable/api/lightning.pytorch.callbacks.ModelCheckpoint.html#lightning.pytorch.callbacks.ModelCheckpoint)
- [ RichModelSummary ](https://lightning.ai/docs/pytorch/stable/api/lightning.pytorch.callbacks.RichModelSummary.html#lightning.pytorch.callbacks.RichModelSummary)
- Added automatically if `use_rich_text` is set to `True` in [config](../../../configs/README.md#topleveloptions).
- Added automatically if `use_rich_text` is set to `True` in [config](../../configs/README.md#topleveloptions).

## ExportOnTrainEnd

Expand All @@ -34,7 +34,7 @@ Performs export on train end with best weights according to the validation loss.
## LuxonisProgressBar

Custom rich text progress bar based on RichProgressBar from Pytorch Lightning.
Added automatically if `use_rich_text` is set to `True` in [config](../../../configs/README.md#topleveloptions).
Added automatically if `use_rich_text` is set to `True` in [config](../../configs/README.md#topleveloptions).

## MetadataLogger

Expand Down

0 comments on commit 26c79a6

Please sign in to comment.