Comments (7)
I'm going to put these in a table called apple_photos_scores
- I'll also pull in the following columns from the ZGENERICASSET
table:
ZOVERALLAESTHETICSCORE
ZCURATIONSCORE
ZHIGHLIGHTVISIBILITYSCORE
ZPROMOTIONSCORE
from dogsheep-photos.
It looks like I can map the photos I'm importing to these tables using the ZUUID
column on ZGENERICASSET
to get a Z_PK
which then maps to the rows in ZGENERICASSET
.
from dogsheep-photos.
Here's the query to create the new table:
create table apple_photos_scores as select
ZGENERICASSET.ZUUID,
ZGENERICASSET.ZOVERALLAESTHETICSCORE,
ZGENERICASSET.ZCURATIONSCORE,
ZGENERICASSET.ZPROMOTIONSCORE,
ZGENERICASSET.ZHIGHLIGHTVISIBILITYSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZBEHAVIORALSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZFAILURESCORE,
ZCOMPUTEDASSETATTRIBUTES.ZHARMONIOUSCOLORSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZIMMERSIVENESSSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZINTERACTIONSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZINTERESTINGSUBJECTSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZINTRUSIVEOBJECTPRESENCESCORE,
ZCOMPUTEDASSETATTRIBUTES.ZLIVELYCOLORSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZLOWLIGHT,
ZCOMPUTEDASSETATTRIBUTES.ZNOISESCORE,
ZCOMPUTEDASSETATTRIBUTES.ZPLEASANTCAMERATILTSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZPLEASANTCOMPOSITIONSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZPLEASANTLIGHTINGSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZPLEASANTPATTERNSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZPLEASANTPERSPECTIVESCORE,
ZCOMPUTEDASSETATTRIBUTES.ZPLEASANTPOSTPROCESSINGSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZPLEASANTREFLECTIONSSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZPLEASANTSYMMETRYSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZSHARPLYFOCUSEDSUBJECTSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZTASTEFULLYBLURREDSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZWELLCHOSENSUBJECTSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZWELLFRAMEDSUBJECTSCORE,
ZCOMPUTEDASSETATTRIBUTES.ZWELLTIMEDSHOTSCORE
from
attached.ZGENERICASSET
join attached.ZCOMPUTEDASSETATTRIBUTES on
attached.ZGENERICASSET.Z_PK = attached.ZCOMPUTEDASSETATTRIBUTES.Z_PK;
from dogsheep-photos.
Twitter thread with some examples of photos that are coming up from queries against these scores: https://twitter.com/simonw/status/1257434670750408705
from dogsheep-photos.
Hey Simon! I really enjoy datasette so far, just started trying it out today following your iPhone photos example.
I am not sure if you had run into this or not, but it seems like they might have changed one of the column names from
ZGENERICASSET
to ZASSET
. Should I open a PR?
Would change:
from dogsheep-photos.
@nickvazz ZGENERICASSET changed to ZASSET in Big Sur. Here's a list of other changes to the schema in Big Sur: https://github.com/RhetTbull/osxphotos/wiki/Changes-in-Photos-6---Big-Sur
from dogsheep-photos.
@nickvazz @simonw I opened a PR that replaces the SQL for ZCOMPUTEDASSETATTRIBUTES
to use osxphotos which now exposes all this data and has been updated for Big Sur. I did regression tests to confirm the extracted data is identical, with one exception which should not affect operation: the old code pulled data from ZCOMPUTEDASSETATTRIBUTES
for missing photos while the main loop ignores missing photos and does not add them to apple_photos
. The new code does not add rows to the apple_photos_scores
table for missing photos.
from dogsheep-photos.
Related Issues (20)
- Annotate photos using the Google Cloud Vision API HOT 5
- Import machine-learning detected labels (dog, llama etc) from Apple Photos HOT 13
- Only install osxphotos if running on macOS HOT 3
- Switch CI solution to GitHub Actions with a macOS runner HOT 1
- apple-photos command should work even if upload has not run HOT 1
- Ability to serve thumbnailed Apple Photo from its place on disk HOT 10
- bpylist.archiver.CircularReference: archive has a cycle with uid(13) HOT 11
- Try out ExifReader HOT 4
- create-subset command for creating a publishable subset of a photos database HOT 1
- Configurable URL for images HOT 1
- Create a public demo HOT 5
- Rename project to dogsheep-photos HOT 8
- photos_with_apple_metadata view should include labels
- Invalid SQL no such table: main.uploads HOT 1
- KeyError: 'Contents' on running upload HOT 3
- photo-to-sqlite: command not found HOT 4
- bucket name
- Support to annotate photos on other than macOS OSes HOT 1
- ImportError: cannot import name 'formatargspec' from 'inspect'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dogsheep-photos.