Coder Social home page Coder Social logo

Comments (3)

ChenglongMa avatar ChenglongMa commented on June 12, 2024

Hi @Arslankmb, thanks for your feedback!

TL;DR

  1. You can ignore this error because it won't affect the results. You can still find the result files in the debug folder and result.csv.
  2. When you process multiple images, no error will be reported. The error is only popped up when processing one image.
  3. I will fix this issue in the next version.

Thanks!


Detailed explanation

stone was originally designed for command line use, not for Jupyter Notebook, so I hadn't considered this issue before.

I have tested the library in a Google Colab notebook and included some working examples (You can also check it by clicking here).
I found that this issue is caused by the OpenCV being incompatible with web browsers (like Google Colab, and Jupyter Notebook).

This issue occurs only when processing a single image, as stone specifically displays the resulting window when only ONE image is being processed.

I will fix this issue in the next version.

Thanks for your attention and patience!

from skintoneclassifier.

ChenglongMa avatar ChenglongMa commented on June 12, 2024

Hi @Arslankmb,

Finally, I decided to remove this small function. Please run pip install skin-tone-classifier --upgrade to upgrade the library to v1.0.1. It won't show the resulting window when processing a single image and also won't report the error in notebooks.

Thanks!

from skintoneclassifier.

ChenglongMa avatar ChenglongMa commented on June 12, 2024

For those looking for help and find this:
stone now can be imported into other projects or Jupyter Notebook env as a library since version 1.1.0.

Please run the following command to upgrade it to version 1.1.0.

pip install skin-tone-classifier --upgrade

Following README#9-used-as-a-library-by-importing-into-other-projects to import stone, e.g.,

import stone

result = stone.process('example.jpeg', , image_type='color')

Then the result would be:

{
  "basename": "example",
  "extension": ".jpeg",
  "image_type": "color",
  "faces": [
    {
      "dominant_colors": [
        {
          "color": "#D7B19F",
          "percent": "0.62"
        },
        {
          "color": "#7A4E3B",
          "percent": "0.38"
        }
      ],
      "skin_tone": "#BEA07E",
      "tone_label": "CG",
      "accuracy": 82.27,
      "face_id": 1
    }
  ],
  "report_images": {
    "1": null
  }
}

Thanks!

from skintoneclassifier.

Related Issues (7)

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.