py-feat icon indicating copy to clipboard operation
py-feat copied to clipboard

AttributeError: 'Detector' object has no attribute 'detect'

Open Capricorn999 opened this issue 1 year ago • 6 comments

Trying the code 01_basics.ipynb in Colab, got the error below. I have also tried it in local environment, end up getting the same result.

Screenshot 2024-10-29 at 17-32-55 01_basics ipynb - Colab

Capricorn999 avatar Oct 29 '24 09:10 Capricorn999

I am experiencing this same error. I'll keep you posted if I figure anything out. Please let me know if you do as well!

l-u-l-u-e avatar Oct 29 '24 16:10 l-u-l-u-e

Try to use detector.detect_image(), it works for me

gardenia06 avatar Nov 13 '24 06:11 gardenia06

Sorry for the confusion, we recently updated the API, but haven't posted the release notes yet. What version of py-feat are you using? The most recent version uses the Detector.detect() api, but older versions have separate detectors for Detector.detect_image() or Detector.detect_video()

ljchang avatar Nov 13 '24 14:11 ljchang

hi @ljchang I'm using the latest: 0.6.2 version but seems that Detector.detect() is not defined contrary to API reference in this version, Detector.detect_image() and Detector.detect_video() is there.

Is there a way to invoke the save parameter with the Detector.detect_image() for appending to csv, similar to this: fex = detector.detect(inputs=single_face_img_path, data_type="image", save='detections.csv')?

See the below example please: image

cr4sh0ut avatar Nov 17 '24 16:11 cr4sh0ut

Have you figured out how to invoke the save parameter with detect_image()? I'm now also searching for a solution to this and I'd appreciate any help.

HannahDe2 avatar Feb 03 '25 14:02 HannahDe2

@Capricorn999 , how do you success installing on colab?

Trying the code 01_basics.ipynb in Colab, got the error below. I have also tried it in local environment, end up getting the same result.

Screenshot 2024-10-29 at 17-32-55 01_basics ipynb - Colab

I got error forever for installing 0.6.2 by normal !pip install py-feat Image

I think it's the dependency problem that colab has many newer packages than py-feat's requirements.

pywugate avatar Oct 18 '25 12:10 pywugate