Skip to content

Commit 63ff140

Browse files
committed
upd
1 parent 980d0fe commit 63ff140

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,59 @@ universities who have used OML in their theses.
3939

4040
<div align="left">
4141

42+
43+
### OML 3.0 has been released!
44+
<details>
45+
<summary>Details</summary>
46+
<p>
47+
48+
The update focuses on two components:
49+
50+
* We introduced the `RetrievalResults` (`RR`) class — a container to store gallery items retrieved for given queries.
51+
`RR` provides a unified way to visualize predictions and compute metrics (if ground truths are known).
52+
It also simplifies post-processing, where an `RR` object is taken as input and another `RR_upd` is produced as output.
53+
With these two objects, you can compare them visually or compute and compare metrics.
54+
Moreover, you can easily create a chain of such post-processors.
55+
* `RR` optimizes memory consumption using batching: in other words, it doesn't store full matrix of query-gallery distances.
56+
(It doesn't make search approximate, it remains exact).
57+
58+
* We made `Model` and `Dataset` the only classes responsible for processing modality-specific logic.
59+
`Model` is responsible for interpreting its input dimensions: `BxCxHxW` for images or `BxLxD` for sequences like texts.
60+
`Dataset` is responsible for preparing an item: it may use `Transforms` for images or `Tokenizer` for texts.
61+
Functions computing metrics, `RetrievalResults`, `PairwiseReranker`, and other classes and functions are unified
62+
to work with any modality.
63+
* We added `IVisualizableDataset` interface requiring `.visaulize()` method for a single item. If implemented,
64+
`RetrievalResults` is able to show the layout of search results.
65+
66+
#### Migration from OML 2.* [Python API]:
67+
68+
Note, the easiest way to catch up with changes is to re-read the examples!
69+
70+
* The recommended way of validation is to use `RetrievalResults` and functions like `calc_retrieval_metrics_rr`,
71+
`calc_fnmr_at_fmr_rr`, and others. `EmbeddingMetrics` is kept for use with PyTorch Lightning and inside Pipelines.
72+
Note, the signatures of `EmbeddingMetrics` methods have been slightly changed.
73+
74+
* Since modality-specific logic is confined to `Dataset`, it doesn't output `PATHS_KEY`, `X1_KEY`, `X2_KEY`, `Y1_KEY`, and `Y2_KEY` anymore.
75+
Keys which are not modality specific like `LABELS_KEY`, `IS_GALLERY`, `IS_QUERY_KEY`, `CATEGORIES_KEY` are still in use.
76+
77+
* `inference_on_images` is now `inference` and works with any modality.
78+
79+
* Slightly changed interfaces of `Datasets.`
80+
81+
* Removed: `IMetricDDP`, `EmbeddingMetricsDDP`, `calc_distance_matrix`, and other internal objects that shouldn't affect you.
82+
83+
#### Migration from OML 2.* [Pipelines]:
84+
85+
* [Feature extraction](https://github.com/OML-Team/open-metric-learning/tree/main/pipelines/features_extraction):
86+
No changes, except for adding an optional argument — `mode_for_checkpointing = (min | max)`.
87+
88+
* [Pairwise-postprocessing pipeline](https://github.com/OML-Team/open-metric-learning/tree/main/pipelines/postprocessing/pairwise_postprocessing):
89+
Slightly changed the name and arguments of the `postprocessor` sub config — `pairwise_images` is now `pairwise_reranker`
90+
and doesn't need transforms.
91+
92+
</p>
93+
</details>
94+
4295
## [FAQ](https://open-metric-learning.readthedocs.io/en/latest/oml/faq.html)
4396

4497
<details>

docs/readme/header.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,56 @@ universities who have used OML in their theses.
3838

3939

4040
<div align="left">
41+
42+
43+
### OML 3.0 has been released!
44+
<details>
45+
<summary>Details</summary>
46+
<p>
47+
48+
The update focuses on two components:
49+
50+
* We introduced the `RetrievalResults` (`RR`) class — a container to store gallery items retrieved for given queries.
51+
`RR` provides a unified way to visualize predictions and compute metrics (if ground truths are known).
52+
It also simplifies post-processing, where an `RR` object is taken as input and another `RR_upd` is produced as output.
53+
With these two objects, you can compare them visually or compute and compare metrics.
54+
Moreover, you can easily create a chain of such post-processors.
55+
* `RR` optimizes memory consumption using batching: in other words, it doesn't store full matrix of query-gallery distances.
56+
(It doesn't make search approximate, it remains exact).
57+
58+
* We made `Model` and `Dataset` the only classes responsible for processing modality-specific logic.
59+
`Model` is responsible for interpreting its input dimensions: `BxCxHxW` for images or `BxLxD` for sequences like texts.
60+
`Dataset` is responsible for preparing an item: it may use `Transforms` for images or `Tokenizer` for texts.
61+
Functions computing metrics, `RetrievalResults`, `PairwiseReranker`, and other classes and functions are unified
62+
to work with any modality.
63+
* We added `IVisualizableDataset` interface requiring `.visaulize()` method for a single item. If implemented,
64+
`RetrievalResults` is able to show the layout of search results.
65+
66+
#### Migration from OML 2.* [Python API]:
67+
68+
Note, the easiest way to catch up with changes is to re-read the examples!
69+
70+
* The recommended way of validation is to use `RetrievalResults` and functions like `calc_retrieval_metrics_rr`,
71+
`calc_fnmr_at_fmr_rr`, and others. `EmbeddingMetrics` is kept for use with PyTorch Lightning and inside Pipelines.
72+
Note, the signatures of `EmbeddingMetrics` methods have been slightly changed.
73+
74+
* Since modality-specific logic is confined to `Dataset`, it doesn't output `PATHS_KEY`, `X1_KEY`, `X2_KEY`, `Y1_KEY`, and `Y2_KEY` anymore.
75+
Keys which are not modality specific like `LABELS_KEY`, `IS_GALLERY`, `IS_QUERY_KEY`, `CATEGORIES_KEY` are still in use.
76+
77+
* `inference_on_images` is now `inference` and works with any modality.
78+
79+
* Slightly changed interfaces of `Datasets.`
80+
81+
* Removed: `IMetricDDP`, `EmbeddingMetricsDDP`, `calc_distance_matrix`, and other internal objects that shouldn't affect you.
82+
83+
#### Migration from OML 2.* [Pipelines]:
84+
85+
* [Feature extraction](https://github.com/OML-Team/open-metric-learning/tree/main/pipelines/features_extraction):
86+
No changes, except for adding an optional argument — `mode_for_checkpointing = (min | max)`.
87+
88+
* [Pairwise-postprocessing pipeline](https://github.com/OML-Team/open-metric-learning/tree/main/pipelines/postprocessing/pairwise_postprocessing):
89+
Slightly changed the name and arguments of the `postprocessor` sub config — `pairwise_images` is now `pairwise_reranker`
90+
and doesn't need transforms.
91+
92+
</p>
93+
</details>

0 commit comments

Comments
 (0)