Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp file could not be set if the external model is not running. #423

Closed
lannyyip opened this issue Jan 14, 2021 · 16 comments
Closed

Temp file could not be set if the external model is not running. #423

lannyyip opened this issue Jan 14, 2021 · 16 comments
Labels

Comments

@lannyyip
Copy link

Expected behaviour

Face recognition should work properly. Temp file could be set.

Actual behaviour

After I checked to enabel FR, by checkbox in FR app , FR does not work

Tell us what happens instead

Steps to reproduce

1.docker exec --user www-data nextcloud php occ -vvv face:background_job
1/10 - Executing task CheckRequirementsTask (Check all requirements)
System: Linux
System memory: 16432766976
PHP Memory Limit: 2147483648
Seems that still don't configured the image area used for temporary files.
Please read the documentation about this: https://github.com/matiasdelellis/facerecognition/wiki/Settings#temporary-files
and then configure it in the admin panel to continue
2. I tried to change the "Temporary files", but after I changed, I could not be saved. This is not happended to other settings.
3. docker exec --user www-data nextcloud php occ config:app:set facerecognition max_image_area --value 786432
I tried to use this cmd to set the value. But the value did not changed. even if i restart the container.

Server configuration

  • Operating system:

  • Pdlib version:

  • How is DLib installed: Make sure it is working correctly with this tool

  • How is PDlib installed: Make sure it is working correctly with this tool

###Dockers from
iamklaus/nextcloud

Client configuration

  • Browser:
    Both Firefox and Chrome
  • Operating system:*
    Windows 10

Logs

Background task log with debug.

sudo -u apache php occ -vvv face:background_job 1/10 - Executing task CheckRequirementsTask (Check all requirements) System: Linux System memory: 16432766976 PHP Memory Limit: 2147483648 Seems that still don't configured the image area used for temporary files. Please read the documentation about this: https://github.com/matiasdelellis/facerecognition/wiki/Settings#temporary-files and then configure it in the admin panel to continue ``` Insert your background log here ```

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

{"reqId":"QZxtAFE81jOdeslFhDPt","level":3,"time":"2021-01-14T13:14:12+00:00","remoteAddr":"192.168.1.12","user":"lanny","app":"index","method":"POST","url":"/apps/facerecognition/setappvalue","message":{"Exception":"Exception","Message":"Cannot connect to external model: Failed to connect to 192.168.1.16 port 8090: Connection timed out","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/facerecognition/lib/Model/ExternalModel/ExternalModel.php","line":107,"function":"open","class":"OCA\FaceRecognition\Model\ExternalModel\ExternalModel","type":"->","args":[]},{"file":"/var/www/html/custom_apps/facerecognition/lib/Controller/SettingsController.php","line":173,"function":"getMaximumArea","class":"OCA\FaceRecognition\Model\ExternalModel\ExternalModel","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"setAppValue","class":"OCA\FaceRecognition\Controller\SettingsController","type":"->","args":["analysis_image_area","4298400"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\FaceRecognition\Controller\SettingsController"},"setAppValue"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\FaceRecognition\Controller\SettingsController"},"setAppValue"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":308,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\FaceRecognition\Controller\SettingsController","setAppValue",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"action":null,"_route":"facerecognition.settings.setAppValue"}]},{"file":"/var/www/html/lib/base.php","line":1008,"function":"match","class":"OC\Route\Router","type":"->","args":["/apps/facerecognition/setappvalue"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/facerecognition/lib/Model/ExternalModel/ExternalModel.php","Line":138,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","version":"20.0.4.0"}

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@matiasdelellis
Copy link
Owner

Please, upload an screenshot of when set temp file size!.

@lannyyip
Copy link
Author

I clicked the icon where the red arrow is pointing. It was remain unsaved.
While the other parameters in this page is savabel.
Snipaste_2021-01-15_05-56-10

@matiasdelellis
Copy link
Owner

I clicked the icon where the red arrow is pointing.

Thank you. More than anything I wanted to check that you clicked that same icon. 🙈

It was remain unsaved.
While the other parameters in this page is savabel.

This parameter is limited by the assigned memory. In your case 2GB. And this probably not enough for the required size.

You should see a notification like this.
imagen

Try reducing the size even a little bit... 😉

@lannyyip
Copy link
Author

Thank you for your quick rsp.
I tried to use size 640×480, but still not savable.
I also notice that I have no block ad. plugin enabled and still not see the hints you paste. :(

@matiasdelellis
Copy link
Owner

Hi,
Now see your log!.

Cannot connect to external model: Failed to connect to 192.168.1.16 port 8090: Connection timed out","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/facerecognition/lib/Model/ExternalModel

Make sure you have the external model working.

https://github.com/matiasdelellis/facerecognition-external-model#test

😉

@lannyyip
Copy link
Author

lannyyip commented Jan 15, 2021

Thank you. I thought it would download the model to local storage. Do I need to keep the external server running all the time?

I can save the config now. I enabled the firewall let throught the port 8090. Thank you.

@matiasdelellis matiasdelellis changed the title Face Recognition does not work, Temp file could not be set Temp file could not be set if the external model is not running. Jan 15, 2021
@matiasdelellis
Copy link
Owner

The external model must work in conjunction with the face:background_job task. so, you must make sure that it is working before running it.
On the other hand, it is also necessary for the configuration. It is something that I had ignored until the last comment. 😅 Thanks. 😬

Change the title of issue to reflect it.. In any case, it should show the notification saying that the model is not working.

@lannyyip
Copy link
Author

I think it would be more reasonable that the model file could be saved locally, so that the flask could be turn off after the model is downloaded.
Thank you for contributing this good app. 👍

@matiasdelellis
Copy link
Owner

I think it would be more reasonable that the model file could be saved locally, so that the flask could be turn off after the model is downloaded.

The problem is not the files. The problem is All the grace of the external model depends on the computer running that. Ie, the limitation of the image size is given by the amount of computer memory running the model.

If you don't want to do this, you must use models 1 or 4 locally. . 😅

@lannyyip
Copy link
Author

I am inside the wall. github file repository is inaccessable in docker. May I can change the URL in the code.

@sebaxakerhtc
Copy link

Same here.
1
2

Any changes on temporary files not saved

@sebaxakerhtc
Copy link

sebaxakerhtc commented Oct 23, 2022

3
Problem was here:
/var/www/nextcloud/apps/facerecognition/templates/settings/admin.php
display: none;
Why by default these buttons (save and restore) are hidden?

@cyberpower678
Copy link

I had to make it a button so I could actually render something to click on.

@matiasdelellis
Copy link
Owner

Hey everyone,
The button is hidden, until you modify something that needs to be saved. 🙈

This bug refers to the fact that while the external model is not running you cannot change anything (And therefore not save). Which, as annoying as it may be, is 100% logical. 😅

I have to show a better message informing better that the external model is off. However, tomorrow I do some test to check the behavior.. 🤔

@cyberpower678
Copy link

cyberpower678 commented Oct 26, 2022

Hey everyone, The button is hidden, until you modify something that needs to be saved. 🙈

This bug refers to the fact that while the external model is not running you cannot change anything (And therefore not save). Which, as annoying as it may be, is 100% logical. 😅

I have to show a better message informing better that the external model is off. However, tomorrow I do some test to check the behavior.. 🤔

That may be the case, but my model is running, and it still wouldn't let me save. I moved the slider around and nothing showed. Turns out the object does not show on newer versions of Nextcloud. I recommend changing <a> to <button>. That will make it show up and work.

@sebaxakerhtc
Copy link

Guys, there's a beta release on official page for NC25 where all works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants