Open aberenguel opened 4 months ago
Trying to continue with --continue
leads to the same error.
Does it work with IPED 4.1.x? Can you share the image with me so I can take a closer look?
I investigated and found that the file iped/conf/metadataTypes.txt
in the case has the following line:
face_encodings = double[]
Does it work with IPED 4.1.x?
I haven't tested yet.
Can you share the image with me so I can take a closer look?
The image has 900 GB. Should I share locally with you?
I investigated and found that the file
iped/conf/metadataTypes.txt
in the case has the following line:face_encodings = double[]
Try to remove this line. I don't see it in my local version of this file, neither in the master branch.
Some tests in Java:
System.out.println(double[].class.getName()); // outputs "[D"
System.out.println(double[].class.getCanonicalName()); // outputs "double[]"
Class.forName("[D"); // returns double[]
Class.forName("double[]"); // throws ClassNotFoundException
I investigated and found that the file
iped/conf/metadataTypes.txt
in the case has the following line:face_encodings = double[]
Try to remove this line. I don't see it in my local version of this file, neither in the master branch.
This line is only in the metadataTypes.txt
file of the case. I set enableFaceRecognition = true
.
I investigated and found that the file
iped/conf/metadataTypes.txt
in the case has the following line:face_encodings = double[]
Try to remove this line. I don't see it in my local version of this file, neither in the master branch.
I replaced by face_encodings = [D
and worked!
There are no arrays in metadataTypes.txt. I guess it should either ignore (not save in the file) array values, or set it as the corresponding object wrapper class of the array elements (in this case java.lang.Double).
face_encodings = double[]
Arrays shouldn't appear into metadataTypes.txt.
or set it as the corresponding object wrapper class of the array elements (in this case java.lang.Double).
I think this is the best approach.
I'll try to reproduce the issue here, I think it happens when the first image where a face is detected have 2 or more faces. If the first image has 1 face, it works with later images with 2+ faces.
This line is only in the
metadataTypes.txt
file of the case. I setenableFaceRecognition = true
.
@aberenguel, is it an "--append"?
@aberenguel what is the jep python lib version you installed on Linux?
--append
No. It is the first evidence.
I processed a case with a single image with 2 faces and I didn't reproduce. The mapping into conf/metadataTypes.txt is:
face_encodings = jep.NDArray
Not sure from where that double[]
is coming from...
@aberenguel what is the jep python lib version you installed on Linux?
I'm using Python virtual environments. It used jep 4.0.3: ./lib/python3.12/site-packages/jep/jep-4.0.3.jar
You didn't change FaceRecognitionTask.py code, right?
You didn't change FaceRecognitionTask.py code, right?
No. It was not modified.
I wonder if it is thing related to Python 3.12.
Processing a folder with this single file triggers this issue.
I wasn't able to reproduce on Windows with image above, IPED detected 7 faces in that image with the correct type:
face_encodings = jep.NDArray
Please @aberenguel try to reproduce on Linux with python 3.9 and numpy 1.x (not 2.0), the same used on Windows.
Please @aberenguel try to reproduce on Linux with python 3.9 and numpy 1.x (not 2.0), the same used on Windows.
Ubuntu 24.04 has only python 3.12. I'll try to get python 3.9 in other way. Btw, the numpy is version 1.26.4.
Try to use conda, you can install different python versions with it.
@aberenguel have you confirmed this happens because of python 3.12? Does it work with previous python versions?
@aberenguel have you confirmed this happens because of python 3.12? Does it work with previous python versions?
I've just tested with Python 3.9.19 (fresh installing modules jep==4.0.3
, tensorflow
, face_recognition
and bs4
).
The error was the same.
I get some old cases I processed in Ubuntu 22.04 and they have face_encodings = jep.NDArray
.
So I think it is not related to Python version.
Another test I've just done.
I upgraded the jep to version 4.2.0
(in pom.xml and with pip).
There is no error anymore and the case was generated with face_encodings = jep.NDArray
.
I upgraded the jep to version
4.2.0
(in pom.xml and with pip).
Great! I was just going to ask you to try that :-)
Confirmed that JEP 4.2.0 solved the problem with Python 3.9 and 3.12
Great, @aberenguel , thank you for testing. JEP 4.2 has some important improvements, mainly "Java Methods can be Annotated to accept Python kwargs", that will be very useful in Aleapp integration. I have made some workaround code for ALeapp bridge task working with the old JEP version, but I think I can remove them with JEP 4.2 and make a cleaner and less complex integration code.
Using Ubuntu 24.04 with latest IPED (master d436a740d), profile pedo.
The error occurred in the end of processing.