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
As a PhotoPrism user, I want image labels to be generated with ONNX-based models, so that I get better labels from a smaller and faster installation.
PhotoPrism currently classifies images with TensorFlow, while face detection already runs on ONNX Runtime. Adding ONNX support for labels as well is a step toward maintaining a single inference runtime instead of two.
Why
Smaller installation. The bundled TensorFlow library is large and ships in every Docker image. Once the remaining TensorFlow-based features have been migrated, it can be removed entirely.
One runtime to maintain. ONNX Runtime is already included for face detection, so labels would reuse what is there.
A better choice of models. Many more models, and more recent ones, are published in ONNX format than for TensorFlow 2. This matters most for users who are comfortable selecting a different model but not converting between formats.
Quality and speed. Modern classifiers are expected to label more accurately than the current model, and ONNX Runtime may be a better fit for this workload.
Expected Behavior
The label vocabulary stays the same, so existing labels remain valid and no re-indexing is required. The model can be selected through the configuration without rebuilding, and custom models supplied by users continue to work (see #5011).
Acceptance Criteria
Image classification MUST be able to run through ONNX Runtime without requiring TensorFlow.
The existing label vocabulary MUST be preserved, so stored labels stay valid and no re-indexing is needed.
The model MUST be selectable through the configuration without rebuilding PhotoPrism.
Custom models supplied by users MUST continue to be supported.
The bundled model SHOULD label at least as accurately as the current one, measured on real photos rather than on published benchmark figures.
Indexing time and memory use SHOULD NOT increase noticeably.
The size of the bundled model SHOULD stay the same or get smaller.
Additional optional models MAY be offered for users who want a different trade-off between accuracy and speed.
As a PhotoPrism user, I want image labels to be generated with ONNX-based models, so that I get better labels from a smaller and faster installation.
PhotoPrism currently classifies images with TensorFlow, while face detection already runs on ONNX Runtime. Adding ONNX support for labels as well is a step toward maintaining a single inference runtime instead of two.
Why
Expected Behavior
The label vocabulary stays the same, so existing labels remain valid and no re-indexing is required. The model can be selected through the configuration without rebuilding, and custom models supplied by users continue to work (see #5011).
Acceptance Criteria
Related