Erotemic / ibeis

image based ecological information system
Apache License 2.0
47 stars 16 forks source link

detect function error: 'pydarknet' has no attribute 'Darknet_YOLO_Detector' #86

Open jeoson7 opened 1 year ago

jeoson7 commented 1 year ago

Hello. First of all, thank you for making this wonderful program.

I've used this ibeis program more than an year on my desktop computer. Now, I'm trying to re-install on my laptop. But, some problems occurred.

My environments : Ubuntu 18.04

1. When I run the ibeis on therminal, I can see some warning comments like below. I can use the ibeis interface, which mean I can see the window of ibeis. Do I have to worry about those warnings?

VTOOL_IBEIS BACKEND FOR pyflann = <module 'pyflann_ibeis' from '/home/tester1/.local/lib/python3.6/site-packages/pyflann_ibeis/init.py'> VTOOL_IBEIS BACKEND FOR FLANN_CLS = <class 'pyflann_ibeis.index.FLANN'> /home/tester1/.local/lib/python3.6/site-packages/ibeis/control/IBEISControl.py:128: UserWarning: Unable to load plugin: 'ibeis_cnn' warnings.warn('Unable to load plugin: {!r}'.format(modname)) /home/tester1/.local/lib/python3.6/site-packages/ibeis/control/IBEISControl.py:128: UserWarning: Unable to load plugin: 'ibeis_cnn._plugin' warnings.warn('Unable to load plugin: {!r}'.format(modname)) Warning: Import Error: No module named 'sip' /home/tester1/.local/lib/python3.6/site-packages/plottool_ibeis/__MPL_INIT__.py:142: MatplotlibDeprecationWarning: The keymap.all_axes rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later. mpl.rcParams[key] = ''

_____ ______  _______ _____ _______
  |   |_____] |______   |   |______
__|__ |_____] |______ __|__ ______|

2. When I tried to use the function "detect", the Error catch! message pops on me! How can I solve this problem?

Screenshot from 2023-04-23 23-03-29

Thank you in advance!

Erotemic commented 1 year ago

I didn't write the detector part of the code base. Have you been able to use it before? Or are you just running into this while trying to do something else?

And no, you shouldn't need to worry about those warnings. The ibeis_cnn is an optional plugin (that I'm not sure if it still works), but it warns if it doesn't find it. The sip module is no longer needed (it was a PyQt4 thing, but we use PyQt5 now), but the code hasn't been updated to remove that warning. The matplotlib issue might require an update to plottool_ibeis, but for now it shouldn't cause a problem.

If you are working with a species that has a trained detector, the WildMe / RPI servers might have stopped hosting the models (all the more reason to move to a distributed solution like IPFS), and that might require help from @bluemellophone but if you haven't been using detect you can just skip it and manually add bounding boxes (or use the action to place a bounding box on the entire image).

bluemellophone commented 1 year ago

The error indicates that the pydarknet repository is not installed, or is not installed correctly. I would recommend drawing the boxes manually, or migrating to the Wild Me fork https://github.com/wildmeorg/wildbook-ia

chancsc commented 1 year ago

you need to use this repo, @jeoson7 https://github.com/bluemellophone/pydarknet

The above version have a class (Darknet_YOLO_Detector) which I think already depreciated in the newer darknet, cannot find the class anymore in the official (?) darknet repo: https://github.com/pjreddie/darknet