Config: Change default vision model assets path to assets/models/ #127

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-08-08 19:06:56 +02:00
parent 2b48fe20dd
commit ab0bd1c732
27 changed files with 186 additions and 82 deletions

View File

@@ -2,6 +2,7 @@ package tensorflow
import (
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
@@ -15,6 +16,9 @@ var defaultImageInput = &PhotoInput{
Width: 224,
}
var assetsPath = fs.Abs("../../../assets")
var examplesPath = filepath.Join(assetsPath, "examples")
func TestConvertValue(t *testing.T) {
result := convertValue(uint32(98765432), &Interval{Start: -1, End: 1})
assert.Equal(t, float32(3024.8982), result)
@@ -29,9 +33,6 @@ func TestConvertStdMean(t *testing.T) {
}
func TestImageFromBytes(t *testing.T) {
var assetsPath = fs.Abs("../../../assets")
var examplesPath = assetsPath + "/examples"
t.Run("CatJpeg", func(t *testing.T) {
imageBuffer, err := os.ReadFile(examplesPath + "/cat_brown.jpg")