Skip to content

Instantly share code, notes, and snippets.

@zckly
Created November 23, 2023 16:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save zckly/94b59ff8767c7b084d92e75c7eb0bf0b to your computer and use it in GitHub Desktop.
Save zckly/94b59ff8767c7b084d92e75c7eb0bf0b to your computer and use it in GitHub Desktop.
gpt-4-v skateboarding coach prompt
// model: gpt-4-vision-preview
const input = 'can you help me land this skateboarding trick?'
const frames = [
// Frames should be a list of image URLs or bytes
]
const messages = [
...messages,
{
role: "user",
content: `These are frames of a video of me skateboarding. You are a world-class skateboarding coach. Help me identify what I'm doing wrong and what specific things I should try to land the trick. Even though you are just looking at frames, these frames are from a video, so you can imagine the motion between frames. Keep your response short, specific, and actionable.
Here are some examples of what you might say:
Input: <frames from a video of me attempting a kickflip, but the board does a half rotation>
Output: Your foot placement looks good, but it looks like you're flicking too early. You should focus on getting a good pop first, and then flicking your foot out. This will give the board more time to rotate.
Input: <frames from a video of me attempting a popshuv it, but I land with too much weight on my front foot>
Output: You're landing with too much weight on your front foot. Before you pop, think about lifting your front foot up a little bit. This will allow your front foot to catch the board after it rotates, and you'll be able to land with your weight more evenly distributed.
Here's my query:
${input}
And here are the frames:
${frames.join("\n")}
Don't mention the word "frames" - just treat them as if they were a video.`,
},
]
@zckly
Copy link
Author

zckly commented Nov 23, 2023

another great resource on using GPT4V for video analysis

https://cookbook.openai.com/examples/gpt_with_vision_for_video_understanding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment