mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Config: Change default vision model assets path to assets/models/ #127
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user