Git Product home page Git Product logo

exadel-inc / compreface-javascript-sdk Goto Github PK

View Code? Open in Web Editor NEW
70.0 5.0 35.0 2.74 MB

JavaScript SDK for CompreFace - free and open-source face recognition system from Exadel

Home Page: https://exadel.com/solutions/compreface/

License: Apache License 2.0

JavaScript 48.36% CSS 4.67% HTML 46.97%
sdk face-recognition face-detection face-verification computer-vision facenet insightface compreface compreface-sdk javascript

compreface-javascript-sdk's People

Contributors

dastnbek avatar pospielov avatar smchedlidze826 avatar vladp456 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

compreface-javascript-sdk's Issues

recognitionService.recognize without limit parameter results in malformed url

Describe the bug
If you call recognize without limit parameter the url is not valid and a 400 is returned from the REST API.

To Reproduce

try {
    const result = await recognitionService.recognize(path_toTestImage, {
      face_plugins: 'landmarks,gender,age',
      det_prob_threshold: 0.95,
      status: true
    });
} catch (e) {
    console.error('Error while recognize' + e.message);
    console.error(e.config.url); // <-- comes here. not good
}

Prints
http://localhost:8000/api/v1/recognition/recognize?det_prob_threshold=0.95?face_plugins=landmarks,gender,age?status=true

Expected behavior
If I do not pass limit it should use a default or build a valid url.
Should be
http://localhost:8000/api/v1/recognition/recognize?det_prob_threshold=0.95&face_plugins=landmarks,gender,age&status=true

Maybe other webservers/backends do not care but I use the docker-compose version from https://github.com/exadel-inc/CompreFace/releases/tag/v1.0.0

I can't add images to the face collection (`TypeError: fs__WEBPACK_IMPORTED_MODULE_1___default.a.createReadStream is not a function`)

Describe the bug
I can't add faces images to the face collection.
I get the following error: TypeError: fs__WEBPACK_IMPORTED_MODULE_1___default.a.createReadStream is not a function.
I tested at versions:

  • compreface-javascript-sdk: 0.5.2 and 0.6.0
  • CompreFace Server: 0.6.0

To Reproduce

faceCollection.add(path_to_image, nameImgEncoded).then(response => {
  console.log(`Image ${path_to_image} added!`);
}).catch(error => {
  console.log(`Oops! There is problem in uploading image ${error}.`);
  console.log(error);
});

Expected behavior
A clear and concise description of what you expected to happen.

Logs

Oops! There is problem in uploading image TypeError: fs__WEBPACK_IMPORTED_MODULE_1___default.a.createReadStream is not a function.
TypeError: fs__WEBPACK_IMPORTED_MODULE_1___default.a.createReadStream is not a function
    upload_path common_endpoints.js:84
    add recognition_service.js:124
    add recognition_service.js:114

Additional context
I checked line 84 from common_endpoints.js (at function upload_path), and there is the following command:

bodyFormData.append('file', fs.createReadStream(image_path), { knownLength: fs.statSync(image_path).size });

Can you help me avoid this possible bug?
Tks!

Is there a Webcam Recognition App for JavaScript SDK?

Hi everyone,

I have recently tested out the compreface_webcam_recognition_demo.py file and it works well in Detection as well as Recognition of saved faces.

I would like to test out the JavaScript sdk for the same application but running on a browser, the app.js in the webcam_demo works well as well but it is only able to perform face detection (I've provided the detection_key)

I would like to ask, is there a similar application to the compreface_webcam_recognition_demo.py but in JavaScript where I can run the application on a web browser and I am able to detect as well as recognize the saved faces?

Thanks and regards,
Abu

Under non-windows platforms, whether it is a path judgment error bug

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Code example.

Expected behavior
A clear and concise description of what you expected to happen.

Logs
If applicable, add logs to help explain your problem.

Additional context
Add any other context about the problem here.

I've submitted the fix code, but it can't seem to be merged

#48

Request error 400 in recognition

Request failes with 400 error even when data is correct

const url = "http://localhost";
const port = 8000;
const compreFace = new CompreFace(url, port);
const recognitionService = compreFace.initFaceRecognitionService(api_key);
const reconocer = await recognitionService.recognize(url, options);

Expected behavior
Perform Image recognition

Additional context
Trying to use the recognition api returns error 400
data: { message: 'Something went wrong, please try again', code: 0 }

Cant resolve 'fs'

Describe the bug
When I try importing CompreFace from "@exadel/compreface-js-sdk" it fails because fs can't be resolved in @exadel/compreface-js-sdk/endpoints
To Reproduce
My code is exactly same as in video down bellow, although I can't run it after importing CompreFace
Code example.

Expected behavior
Project running successfully without errors

Logs

Screenshot 2022-05-10 at 22 49 08

Additional context
Everything should work as I have followed tutorial straight forward

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.