forked from Github/frigate
Embeddings normalization fixes (#14284)
* Use cosine distance metric for vec tables * Only apply normalization to multi modal searches * Catch possible edge case in stddev calc * Use sigmoid function for normalization for multi modal searches only * Ensure we get model state on initial page load * Only save stats for multi modal searches and only use cosine similarity for image -> image search
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
useEmbeddingsReindexProgress,
|
||||
useEventUpdate,
|
||||
useModelState,
|
||||
useWs,
|
||||
} from "@/api/ws";
|
||||
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||
import AnimatedCircularProgressBar from "@/components/ui/circular-progress-bar";
|
||||
@@ -202,6 +203,14 @@ export default function Explore() {
|
||||
|
||||
// model states
|
||||
|
||||
const { send: sendCommand } = useWs("model_state", "modelState");
|
||||
|
||||
useEffect(() => {
|
||||
sendCommand("modelState");
|
||||
// only run on mount
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
const { payload: textModelState } = useModelState(
|
||||
"jinaai/jina-clip-v1-text_model_fp16.onnx",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user