Skip to main content

Sort images by an automatically generated ID before photo-ID

Project description

Pyseter

Pyseter is a Python package for processing images before photo-identification.

We expect that most people using Pyseter will be familiar with R, and completely new to Python. Regardless, we chose to release Pyseter as a Python package because it relies heavily on Pytorch, a deep learning library. If you're new to Python, please follow the steps under Installation: No Python experience.

If you're already a Pythonista, or just already have Python and conda installed, proceed to Installation: Python and conda already installed.

Installation: No Python experience

Install conda

Conda is an important tool for managing packages in Python. Unlike Python, R (for the most part) handles packages for you behind the scenes. Python requires a more hands on approach.

  • Download and install Miniforge (a form of conda)

After installing, you can verify your installation by opening the command line interface (CLI), which will depend on your operating system. Are you on Windows? Open the "miniforge prompt" in your start menu. Are you on Mac? Open the Terminal application. Then, type the following command into the CLI and hit return.

conda --version

You should see something like conda 25.5.1. Of course, Anaconda, miniconda, mamba, or any other form of conda will work too.

Create a new environment

Then, you'll create an environment for the package will live in. Environments are walled off areas where we can install packages. This allows you to have multiple versions of the same package installed on your machine, which can help prevent conflicts.

Enter the following two commands into the CLI:

conda create -n pyseter_env
conda activate pyseter_env

Here, I name (hence the -n) the environment pyseter_env, but you can call it anything you like!

Now your environment is ready to go! Try installing your first package, pip. Pip is another way of installing Python packages, and will be helpful for installing PyTorch and Pyseter (see below). To do so, enter the following command into the CLI.

conda install pip -y

Once this is working, you're ready to proceed to the next section.

Installation: Python and conda already installed

Install PyTorch

Installing PyTorch will allow users to extract features from images, i.e., identify individuals in images. This will be fast for users with an NVIDIA GPU or 16 GB Mac with Apple Silicon. For all other users, extracting features from images will be extremely slow.

PyTorch installation can be a little finicky. I recommend following these instructions. Below is an example for Windows users. If you haven't already, open you're command line interface (e.g., the miniforge prompt). Then activate your environment before installing.

conda activate pyseter_env
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126

PyTorch is pretty big (over a gigabyte), so this may take a few minutes.

Install Pyseter

Now, install Pyseter. If you haven't already, activate your environment before installing.

conda activate pyseter_env
pip3 install pyseter

Now you're ready to go!

AnyDorsal weights

Pyseter relies on the AnyDorsal algorithm to extract features from images. The first time you use the FeatureExtractor, Pyseter will download the AnyDorsal weights from Hugging Face. The weights take up roughly 4.5 GB. As such, to use the FeatureExtractor, users must have enough storage space to accommodate the weights.

Getting Started: No Python Experience

Install VS Code

Most users will interact with Pyseter via a Jupyter Notebook. There are many methods for opening, editing, running, and saving Jupyter Notebooks. We are personally biased towards VS Code. Of course, you are also welcome to use Jupyter Lab, or even Positron.

First, download VS Code from the webpage according to your operating system, then follow the installation instructions.

Open VS Code, then click "File -> Open Folder". Navigate to wherever you'd like to work, then click "New Folder." You can call this folder something like "learn-pyseter" or "pyseter-jobs". Open the new folder. Click "File -> New File" then select Jupyter Notebook. Click "Select Kernel" in the top right corner, select "Python environments" and then "pyseter_env", or whatever you named your environment. For more information, check out this great overview of using Jupyter Notebooks in VS Code.

Now you're ready to proceed to the next section.

Getting Started: Jupyter Notebook ready

Open a Jupyter Notebook and select the appropriate kernel (i.e., the environment you created above). Then, verify the Pyseter installation by running the following cell in your notebook.

import pyseter
pyseter.verify_pytorch()

If you're on a windows computer with an NVIDIA GPU, you should see something like

✓ PyTorch 2.7.1+cu126 detected
✓ CUDA GPU available: NVIDIA A30 MIG 2g.12gb

Once this is working, you're ready to check out the "General Overview" notebook in the examples folder of this repository!

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

pyseter-0.3.0.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

pyseter-0.3.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file pyseter-0.3.0.tar.gz.

File metadata

  • Download URL: pyseter-0.3.0.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pyseter-0.3.0.tar.gz
Algorithm Hash digest
SHA256 085d81af298d3d985997a0d5c5b91b471fc6d07fa54a6404f5a437845df121c8
MD5 98ec73baeb241b7d3765049973e0f65f
BLAKE2b-256 031d38b70ec2fc82cc5e06e501323b075928954cc0c05923d757ab7f6ce03c66

See more details on using hashes here.

File details

Details for the file pyseter-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pyseter-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pyseter-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c025fd2b81cd0ad6a5fc0ce27ee1aba338bb6cdfd07a018bca9fb97e747eab1
MD5 a635f99defbfcf0c0e683c2ee40f85fa
BLAKE2b-256 61c906cb28f64a0c69bf5c53b9d6ac89ce9313922a7fe1d8f59730b0ada2bc92

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