Giter Site home page Giter Site logo

Comments (2)

JustinShenk avatar JustinShenk commented on June 4, 2024

from fer.

Fqlox avatar Fqlox commented on June 4, 2024

Alright, I tried :


import cv2
from fer import FER
import os

os.environ["SM_FRAMEWORK"] = "tf.keras"

detector = FER(mtcnn=True) # or with mtcnn=False for Haar Cascade Classifier

image = cv2.imread("justin.png") ....

I got :

WARNING:tensorflow:From /Users/user/opt/miniconda3/envs/fer/lib/python3.6/site-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
Traceback (most recent call last):
  File "webcam.py", line 13, in <module>
    detector = FER(mtcnn=True) # or with mtcnn=False for Haar Cascade Classifier
  File "/Users/user/opt/miniconda3/envs/fer/lib/python3.6/site-packages/fer/fer.py", line 98, in __init__
    from mtcnn.mtcnn import MTCNN
  File "/Users/user/opt/miniconda3/envs/fer/lib/python3.6/site-packages/mtcnn/__init__.py", line 26, in <module>
    from mtcnn.mtcnn import MTCNN
  File "/Users/user/opt/miniconda3/envs/fer/lib/python3.6/site-packages/mtcnn/mtcnn.py", line 37, in <module>
    from mtcnn.network.factory import NetworkFactory
  File "/Users/user/opt/miniconda3/envs/fer/lib/python3.6/site-packages/mtcnn/network/factory.py", line 26, in <module>
    from keras.layers import Input, Dense, Conv2D, MaxPooling2D, PReLU, Flatten, Softmax
  File "/Users/user/opt/miniconda3/envs/fer/lib/python3.6/site-packages/keras/__init__.py", line 20, in <module>
    from . import initializers
  File "/Users/user/opt/miniconda3/envs/fer/lib/python3.6/site-packages/keras/initializers/__init__.py", line 124, in <module>
    populate_deserializable_objects()
  File "/Users/user/opt/miniconda3/envs/fer/lib/python3.6/site-packages/keras/initializers/__init__.py", line 49, in populate_deserializable_objects
    LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
AttributeError: module 'tensorflow.compat.v2.__internal__' has no attribute 'tf2'

from fer.

Related Issues (20)

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.