I tested my program unfortunately without conclusive results.
the film is identical to that obtained with my old and complete installation.
It’s strange …
Regards
François
Hi
I think that the problème is due to the opencv adaptability with the raspbian version used.
I will think about:
either change linux distribution (but I will face other problems on other applications used on raspberry)
either change my script regarding the movment and saving detection
regards
François
Maybe, consider jumping back to a previous version of opencv that is compatible?
scraping the code.
Seeing the new htop prints makes me want to see the exactly how much cpu and ram this program wants to eat up. Remember when you made it run on your windows machine. I’d start commenting out parts of the code to find exactly where the resources are going.
Revisiting video encoding.
I also want to revisit this.
Before we were not sure what was causing the problem, so when we saw the encoding work on the windows machine we put this idea to bed. BUT now we think its processor-power related. A quality encoding can be cpu intensive, but you’re windows machine would not have noticed. It may be that a different, light-weight encoding will reduce the cpu footprint and allow the program to run smoothly on the PI.
Hi Pixmusix
So I have tested swapping the encoder the result is the same way whatever the configuration (basic OS with applications or cleaned OS without any applications)
Jumping back to previous version of opencv seems a good alternative but which version should I choose? And which method ( Apt or pip ) ? But before that I want to test the possibility with a virtual environment do you think that a good idea ?
the objective of my script is to detect the comings and goings of animals in my garden (birds, squirrels, etc.) in order to carry out some tests of the intelligence of individuals on different practical exercises, particularly on crows and magpies. I thought with opencv I could sort individuals and sort my captures. Maybe in the end just detecting a movement would be enough. I will sort it manually after capture on the computer.
thanks you for your help
regards
François
@JohnAldrin265147 : What is your problem exactly , the same I have on my raspberry ? Because for the moment we have no solution.
Which raspberry do you use?
Which OS environment?
Which camera and connection?
briefly resume the progress of @Pixmusix above …
Regards
Super tough.
Not sure which version. At this point, without the same setup as you to debug, I’m just working through my debugging checklist and hoping something works . Trying to think outside the box with you.
Think about reducing the frame rate of the capture.
I’m imagining a function like the below.
if detection and 1000_millis_elapsed_since_last_capture():
out.write(frame)
If you would like to peruse this I’d suggest using pickle. You can pickle the out object and save that on disk. Then un-pickle them on a powerful computer for the rendering. Pickling is fast, and uses very small amounts of ram and rom.
Hi
Finally after many tests I think that Opencv is not adapted for raspberry Pi ( Opencv application requires too many resources)
So I have changed by lighter application MotionEye whose results suit me perfectly
thanks you very much for your help
Regards
François
I have a small issue not a big one. when running the facial_req.py file there is no yellow box showing up as mentioned and there is no error in the terminal as well. i am not sure as to what the error could be.
I have loved this tutorial so far and is is very interesting.
Hi @NhyiraKwabena268414
Good news!
Seems like the repo this tutorial is inspired by is under an MIT licence.
This licence allows you to freely copy and modify any code or assets that falls under it.
That means you can fork the repository and rework it to detect fire.
Good luck.
Pix
Hi @Pixmusix
I’m trying to run this command to train the model:
pi@raspberrypi:~/facial_recognition $ python train_model.py
Traceback (most recent call last):
File “train_model.py”, line 5, in
import face_recognition
ImportError: No module named face_recognition
As was said in the tutorial of Caroline Dunn, in this case we need to reinstall face-recognition.
If I run this with command | pip install face-recognition | I get every time follow error:
… Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib … error
…CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find PythonInterp: Found unsuitable version “2.7.16”, but
** required is at least “3.6” (found /usr/bin/python)**
If I run this with command | pip3 install face-recognition | installation is successful, but train_model.py said me that face-recognition module is missing.
Could you help me understand where is the problem here?
So, it was self resolved))
I made | pi@raspberrypi:~/facial_recognition $ sudo apt-get install libopenblas-dev libatlas-base-dev libblas-dev |
After that performed one more time | pip3 install face-recognition |
and installed all imutils and ipiputils (see post #16 from Nathan)
and after that run train_model.py through Thonny and it was successful.