Skip to content

This project copies wanted photos and deletes unwanted photos from iCloud to a local computer with default saving for photos recognized as containing 'human' objects.

License

Notifications You must be signed in to change notification settings

yhmyhm0910/DETR-Filter-iCloud-Photos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delete iCloud Photos with DETR Model Filter

Overview

This project copies wanted photos and deletes unwanted photos from iCloud to a local computer with default saving for photos recognized as containing 'human' objects. The system utilizes Facebook DETR-resnet-50 model to identify and categorize objects, saving time by focusing on photos with human subjects. The motivation behind this project is partly driven by the high costs associated with iCloud storage, providing an economical alternative for managing the photo library.

Features

  1. Object Identification with threadings:
    • Utilizes the DETR model to recognize and categorize objects within the photos with Python threading to improve computation time by 25%.
  2. iCloud Integration:
    • Fetch photos from your iCloud storage.
  3. Web UI:
    • A web UI is developed for better UX.
  4. Automatic Sorting:
    • Photos are automatically organized based on the identified objects.
  5. Local Hosting:
    • Transfers and stores photos locally on a local machine.

Requirements

  • iCloud account credentials
  • Python environment with necessary dependencies

Run Locally

  1. Clone the project
  git clone https://github.com/yhmyhm0910/DETR-Filter-iCloud-Photos
  1. Go to the project directory
  cd DETR-Filter-iCloud-Photos
  1. Install dependencies for server
  cd server
  npm install
  1. Create a file name .env at /server and set
  PORT={your port number}
  JWT_SECRET_KEY={your JWT secret key}
  1. Start the server
  yarn start
  1. Install dependencies for web client
  cd ..
  cd web
  npm install
  1. Start the web server
  yarn start
  1. Follow the instructions on the web UI. Wanted images will finally be stored at both /server/saved_images locally and iCloud.

Demo

The video demo can be found here.

System Architecture

  1. Local Server
    • Perform object detections
    • Save images
    • Login and copy/delete photos from iCloud
  2. Web Server
    • Provide UI

System Architecture

Limitations and known errors

  1. iCloud login may face error sometimes. If an email of successful login is sent to your iCloud email, please refresh the page and enter the credentials again. It will work. This problem is hard to fix since PyiCloud is not officially support by Apple :'(
  2. Videos cannot be processed.
  3. Significant high usage of both CPU and RAM when object identifying many images.
  4. Hidden photos are included.

Contributing

Feel free to contribute to the project by opening issues, submitting feature requests, or creating pull requests. Your feedback and contributions are highly appreciated!

License

This project is licensed under the MIT License.

About

This project copies wanted photos and deletes unwanted photos from iCloud to a local computer with default saving for photos recognized as containing 'human' objects.

Topics

Resources

License

Stars

Watchers

Forks