Skip to content

Commit

Permalink
Notebook for matching scenes with StashDB UUIDs with TPDB
Browse files Browse the repository at this point in the history
  • Loading branch information
MinasukiHikimuna committed Aug 7, 2024
1 parent ca51dd3 commit beecf04
Show file tree
Hide file tree
Showing 4 changed files with 577 additions and 0 deletions.
27 changes: 27 additions & 0 deletions pandas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,30 @@ After opening this repository in Visual Studio Code, remember to set correct ker
Now you can start experimenting with Stash and Pandas by looking at hello_world.ipynb.

![Example notebook with Data Wrangler](images/hello_world_data_wrangler.png)

# Notebooks

## Hello World

A handful of samples to get you going.

## Scene Matching

Tailored to a workflow where scenes have been matched to StashDB first and you want to match to TPDB without using TPDB's data directly.

Process is as follows:

1. Set TPDB_API_KEY value in .env file to your TPDB API key
2. Run initial cells to create Stash app connection and create utility functions
3. Run studio summary to figure out which networks have most scenes missing TPDB. Open `df_scenes_grouped_by_studio` in Data Wrangler.
4. Iterate following process
1. Find studio with name
1. Get 100 scenes at a time from Stash app
1. Get TPDB matches with phash and get the best match in a single table
1. Open `df_matched_scenes` in Data Wrangler
1. Manually verify with Data Wrangler UI that scenes match as you expected
1. Save TPDB UUIDs to your Stash app with one of the last cells. There are multiple examples based on if you are comfortable saving TPDB UUIDs only to those scenes which match all identifiers or if you want something more specific.

![Studios with most missing scenes](images/scene_matching_studio_summary.png)

![Matched scenes under review](images/scene_matching_manual_review.png)
Binary file added pandas/images/scene_matching_manual_review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pandas/images/scene_matching_studio_summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit beecf04

Please sign in to comment.