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

Add support for using imaginary to create the temporary files. #616

Merged
merged 7 commits into from
Mar 9, 2023

Conversation

matiasdelellis
Copy link
Owner

@matiasdelellis matiasdelellis commented Dec 15, 2022

This allows for "paratically" free add support for images heic, tiff, and many more.

You must configure the imaginary service in nextcloud.

See the documentation about it, but basically you need to edit config/config.php and append:

+'preview_imaginary_url' => 'http://localhost:9000',
...and enable new file types in our app:

+'enabledFaceRecognitionMimetype' => array(
+  0 => 'image/jpeg',
+  1 => 'image/png',
+  2 => 'image/heic',
+  3 => 'image/tiff',
+  4 => 'image/webp', 
+),

Finally adds the --crawl-missing option that forces a search for the files to analyze the new allowed types.

This allows for "paratically" free add support for images heic,
tiff, and many more.

You must configure the imaginary service in nextcloud.

See the documentation about it, but basically you need to edit
config/config.php and append:

+'preview_imaginary_url' => 'http://localhost:9000',

...and enable new file types in our app:

+'enabledFaceRecognitionMimetype' => array(
+  0 => 'image/jpeg',
+  1 => 'image/png',
+  2 => 'image/heic',
+  3 => 'image/tiff',
+  4 => 'image/webp',
+),

Finally adds the --crawl-missing option that forces a search for the
files to analyze the new allowed types.
@matiasdelellis
Copy link
Owner Author

[matias@nube nextcloud]$ sudo -u apache php occ face:background_job -u user --crawl-missing
1/8 - Executing task CheckRequirementsTask (Check all requirements)
2/8 - Executing task CheckCronTask (Check that service is started from either cron or from command)
3/8 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.)
4/8 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB)
5/8 - Executing task CreateClustersTask (Create new persons or update existing persons)
	Clusters already exist, estimated there is no need to recreate them
6/8 - Executing task AddMissingImagesTask (Crawl for missing images for each user and insert them in DB)
	Finding missing images for user user
7/8 - Executing task EnumerateImagesMissingFacesTask (Find all images which don't have faces generated for them)
8/8 - Executing task ImageProcessingTask (Process all images to extract faces)
	NOTE: Starting face recognition. If you experience random crashes after this point, please look FAQ at https://github.com/matiasdelellis/facerecognition/wiki/FAQ
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/Heic/image1.heic
	Faces found: 0
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/Heic/image4.heic
	Faces found: 0
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/big-bang-theory-1-1535107342.jpg
	Faces found: 7
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/Heic/image3.heic
	Faces found: 0
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/Heic/image2.heic
	Faces found: 0
[matias@nube nextcloud]$ 
[matias@nube nextcloud]$ sudo mcedit config/config.php 
[sudo] password for matias: 

[matias@nube nextcloud]$ sudo -u apache php occ face:background_job -u user --crawl-missing
1/8 - Executing task CheckRequirementsTask (Check all requirements)
2/8 - Executing task CheckCronTask (Check that service is started from either cron or from command)
3/8 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.)
4/8 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB)
5/8 - Executing task CreateClustersTask (Create new persons or update existing persons)
	Clusters already exist, estimated there is no need to recreate them
6/8 - Executing task AddMissingImagesTask (Crawl for missing images for each user and insert them in DB)
	Finding missing images for user user
7/8 - Executing task EnumerateImagesMissingFacesTask (Find all images which don't have faces generated for them)
8/8 - Executing task ImageProcessingTask (Process all images to extract faces)
	NOTE: Starting face recognition. If you experience random crashes after this point, please look FAQ at https://github.com/matiasdelellis/facerecognition/wiki/FAQ
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/Glee | Fallece Jane Galloway, actriz de 'Glee' y 'The Big Bang.webp
	Faces found: 3
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/Big Bang Theory' finale gives Amy a mini makeover - Insider.webp
	Faces found: 2
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/The Griffin Equivalency.webp
	Faces found: 2
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/q0Y9wD_Fq_1256x620__1.webp
	Faces found: 1
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/Joe Manganiello | The Big Bang Theory.webp
	Faces found: 2
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/sheldon-and-mrs-hofstadter.webp
	Faces found: 2
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/mrs-hofstadter-and-penny.webp
	Faces found: 0
	Processing image /media/datos/Services/nextcloud/data/user/files/Photos/The Big Bang Theory/Der Hüpfburg-Enthusiasmus | Big Bang Theory Wiki | Fandom.webp
	Faces found: 2

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

Successfully merging this pull request may close these issues.

1 participant