Skip to main content

A tool that extracts samples created using the Scan Your Trash app.

Project description

Scan Your Trash

This library helps extract data from samples created with the Scan Your Trash app.

Using as command line tool

After installing this package you will get access to the scan-your-trash command line tool.

Syncing files from s3 to disk

The sync command downloads any samples on the s3 bucket that aren't already on your disk. It ignores files that already have been downloaded.

It's recommended to install the awscli utility when using this functionality.

  1. Make sure you log in to the s3 bucket: aws configure --endpoint https://landfill.scantrash.de
  2. Start a sync job: scan-your-trash sync <bucket-name> ./

Unpacking a sample into frames

  1. Make sure you have a folder to store the unpacked results: mkdir unpacked
  2. Unpack the sample: scan-your-trash unpack 4/54E2CF4C-3E61-483B-91C9-D668D2E76537.mov unpacked

Using as a library

Example:

from scan_your_trash import Reader

with Reader("4/54E2CF4C-3E61-483B-91C9-D668D2E76537.mov") as r:
  print(r.get_metadata())

Reader exposes the following methods:

  • get_recycling_logo() - Returns None or the recycling logo photo as PIL.Image
  • get_metadata() - Returns the global metadata for the sample
  • get_samples(compute_mask = True) - Yields frame samples: (timestamp, main_frame, depth_frame, saliency_frame, object_mask, frame_meta)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scan_your_trash-1.0.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scan_your_trash-1.0.1-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file scan_your_trash-1.0.1.tar.gz.

File metadata

  • Download URL: scan_your_trash-1.0.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for scan_your_trash-1.0.1.tar.gz
Algorithm Hash digest
SHA256 30a15b14ec9779c4c557e679b6ab89b23f6ceb94f8ef37d38b7ac67fd5ddee96
MD5 c5fb12f8f0d4f98fbd22dacaee0280b4
BLAKE2b-256 34e65ddfe661d4349c34f5c2102121617dfbe099e1f00eaa73678d346939a253

See more details on using hashes here.

File details

Details for the file scan_your_trash-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for scan_your_trash-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f3a83c73fed157c4268cc41e6deb7d2341e2c46a14573124742e75b3021d0280
MD5 0d67f7a8e8068865a90b13a52d095554
BLAKE2b-256 ef4c1a5e731b3218adcda3c5f9c38a9c8b3f6295777ac13bfe186474e6a327b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page