Comments (21)
Not yet, I will check a bit later.
from go-face.
@SXerox007 i will check today at home and ping you
from go-face.
Try with higher tolerance.
from go-face.
I increased the tolerance small 0.8 then it always give the can't classify.
from go-face.
But both the images are same
from go-face.
Please upload your test code and images.
from go-face.
`
//TODO ---> Get the image url from db
dataImage := filepath.Join(DATA_DIR, "mix.jpg")
faces, err := rec.RecognizeFile(dataImage)
if err != nil {
return err
}
var samples []face.Descriptor
var totalF []int32
for i, f := range faces {
samples = append(samples, f.Descriptor)
// Each face is unique on that image so goes to its own category.
totalF = append(totalF, int32(i))
}
// Pass samples to the recognizer.
rec.SetSamples(samples, totalF)
// Now let's try to classify some not yet known image.
testData := filepath.Join(DATA_DIR, "sumit.jpg")
res, err := [rec.RecognizeSingleFile(testData)](url)
if err != nil {
log.Println("Face not recorganise not the same person")
return status.Errorf(
codes.Internal,
fmt.Sprintln(errormsg.ERR_FACE_NOT_REC))
}
if res == nil {
log.Println("Not a sigle image")
return status.Errorf(
codes.Internal,
fmt.Sprintln(errormsg.ERR_NOT_A_SINGLE_FACE))
}
id := rec.ClassifyThreshold(res.Descriptor, 0.6)
if id < 0 {
log.Println("Can't classify")
return status.Errorf(
codes.Internal,
fmt.Sprintln(errormsg.ERR_MSG_INTERNAL_SERVER))
}
log.Println("id", id)
log.Println("Image recorganise")
from go-face.
from go-face.
The three images I uploaded the first one named eminem.jpg 2nd one mix.jpg and 3rd one is sumit.jpg
from go-face.
Do you check @Kagami ?
from go-face.
Hi @Kagami do you tell me when you will see this issue. ? Can you tell me what's the issue or something any hint !
from go-face.
Hi @Kagami have you seen this issue ?
from go-face.
Hi, not yet, currently busy with other projects.
from go-face.
@SXerox007 hey, guy! I was writing some functions for using with go-face and it works properly:
func compare_faces(samples []face.Descriptor, comp face.Descriptor, tolerance float32) int {
res := face_distance(samples, comp)
r := -1
v := float32(1)
for i, s := range res {
t := euclidean_norm(s)
if t < tolerance && t < v{
v = t
r = i
}
}
return r
}
func face_distance(samples []face.Descriptor, comp face.Descriptor) []face.Descriptor {
res := make([]face.Descriptor, len(samples))
for i, s := range samples {
for j, _ := range s {
res[i][j] = samples[i][j] - comp[j]
}
}
return res
}
func euclidean_norm(f face.Descriptor) float32 {
var s float32
for _, v := range f {
s = s + v * v
}
return float32(math.Sqrt(float64(s)))
}
You can call compare_faces and it will return index of samples with the best matches but below set tolerance.
from go-face.
@vaizmanai not working.
from go-face.
Test with multiple images ,single image result is same. Not working.
from go-face.
@SXerox007 so it is working properly, i used your part of code, your test images, check youself: test
from go-face.
@vaizmanai I use the different images. id return some value if image is not even the same. I click the image form my phone and compare it will be return some value.
from go-face.
Attach example photos with fails
from go-face.
@vaizmanai busy with some other things send you the example soon.
from go-face.
I've fixed few bugs in ClassifyThreshold
, please try with latest version from master.
from go-face.
Related Issues (20)
- windows run : running g++ failed: exit status 1 cannot find -lblas: No such file or directory HOT 5
- How to use a face detection model with 68 feature points.
- library not work with AWS Lambda ECR
- openblas is installed on WIN10, but I still get undefined reference to `cblas_sgemm'
- Error recognizing unclassified faces.
- go get issue in ubuntu 20.04 HOT 1
- face alignment HOT 1
- Issue with go get on M1 MacOS HOT 6
- issu with install
- how to save model and load it later?
- How does Centos install dlib?
- does go face support docker or not HOT 2
- Face matching
- There is a problem, please help to look at it HOT 9
- Find similar faces?
- Option to ignore a specific folder
- SIGILL: illegal instruction HOT 5
- Opencv Image buffer
- cant run functions ("undefined 1.2"), need to update face.go? HOT 9
- got error "jpeg_mem_loader: unsupported pixel size"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-face.