"Analyzing what people do in a video clip can be conducted through various methods, often combining both qualitative and quantitative approaches. Here’s a structured way to perform such an analysis:\n",
"\n",
"### 1. **Object Detection and Tracking**\n",
"\n",
"**a. Tools and Techniques**:\n",
" - **Computer Vision Libraries**: Utilize libraries like OpenCV, TensorFlow, or PyTorch which provide pre-trained models for detecting and tracking objects or human figures (e.g., YOLO, Faster R-CNN).\n",
" - **Pose Estimation**: Implement algorithms such as OpenPose or PoseNet to detect human poses and movements, which can give insights into the activities being performed.\n",
"\n",
"**b. Analysis**:\n",
" - Extract data on movement speed, direction, and interaction with other objects or people.\n",
" - Track how many people are present and how they are distributed in the frame.\n",
"\n",
"### 2. **Action Recognition**\n",
"\n",
"**a. Techniques**:\n",
" - Use machine learning models trained on labeled datasets (like UCF101 or Kinetics) to classify specific actions occurring in the video (e.g., walking, running, jumping).\n",
"\n",
"**b. Implementation**:\n",
" - Extract frames from the video and input them into a pre-trained action recognition model to obtain predictions.\n",
" - Analyze the temporal dynamics of different actions using techniques like recurrent neural networks (RNNs) or 3D CNNs to understand how actions change over time.\n",
"\n",
"### 3. **Scene Understanding**\n",
"\n",
"**a. Semantic Segmentation**: \n",
" - Apply models for semantic segmentation to identify different components of the scene, which helps contextualize the actions being performed (e.g., recognizing an office vs. a park).\n",
"\n",
"**b. Contextual Analysis**: \n",
" - Analyze the background and setting to infer what activities are likely occurring based on environmental cues (e.g., people sitting in a café likely engaging in conversation or work).\n",
"\n",
"### 4. **Behavioral Analysis**\n",
"\n",
"**a. Annotation and Tagging**:\n",
" - Manually annotate segments of the video to detail actions, emotions, and interactions. This could be done using tools like VGG Image Annotator or Labelbox.\n",
"\n",
"**b. Emotional and Social Cues**:\n",
" - Observe and record non-verbal cues such as body language, facial expressions, and group dynamics. Applications in social sciences or psychology can provide insights into interpersonal interactions.\n",
"\n",
"### 5. **Statistical and Computational Analysis**\n",
"\n",
"**a. Data Aggregation**:\n",
" - Post-processing the data collected (e.g., number of actions detected, duration of each action) to spot trends and patterns.\n",
"\n",
"**b. Temporal Analysis**:\n",
" - Analyze the sequence and frequency of actions over time, identifying peaks in activity or significant changes in behavior.\n",
"\n",
"### 6. **Visualization and Reporting**\n",
"\n",
"**a. Visualization Tools**:\n",
" - Use tools like Tableau, Matplotlib, or D3.js to create visual representations of the data collected, such as heatmaps of movement, bar charts of action counts, etc.\n",
"\n",
"**b. Reporting Outcomes**:\n",
" - Compile findings into a structured report outlining key behaviors, statistics, and observations to communicate the analytical insights effectively.\n",
"\n",
"### Conclusion\n",
"\n",
"By employing a combination of these techniques, one can gain a comprehensive understanding of what people are doing in a video clip. The approach can vary depending on the specific context and objectives of the analysis, whether it's for behavioral research, marketing insights, or security surveillance.\n"
]
}
],
"source": [
"# To give you a preview -- calling OpenAI with these messages is this easy. Any problems, head over to the Troubleshooting notebook.\n",
"\n",
"message = \"Hello, GPT! This is my first ever message to you! Hi!\"\n",
"The website \"Home - Edward Donner\" is a personal site showcasing the professional background and interests of Ed Donner. He is a co-founder and CTO of Nebula.io, where he focuses on using AI to enhance talent discovery and management. Ed also has a history in AI startups, having previously founded untapt, which was acquired in 2021.\n",
"\n",
"## Interests and Activities\n",
"- Passionate about coding and experimenting with LLMs (large language models).\n",
"- Enjoys DJing and amateur electronic music production.\n",
"- Engages with the tech community via platforms like Hacker News.\n",
"\n",
"## Recent News and Announcements\n",
"- **January 23, 2025:** Announcement of resources for a hands-on LLM Workshop.\n",
"- **December 21, 2024:** Welcoming SuperDataScientists to the community.\n",
"- **November 13, 2024:** Shared resources for mastering AI and LLM Engineering.\n",
"- **October 16, 2024:** Released resources on transitioning from Software Engineer to AI Data Scientist."
"The \"be able\" website presents an organization dedicated to fostering inclusion, creativity, and social competence through various projects and workshops. Their mission emphasizes collaborative design processes that aim to create actionable solutions for complex challenges in society. \n",
"\n",
"## Key Features:\n",
"- **Vision**: A society co-designed by all individuals.\n",
"- **Activities**: Development of customized educational formats to enhance inclusion and creativity.\n",
"- **Collaborative Approach**: Engagement in design processes that generate practical solutions.\n",
"\n",
"The site includes sections about the team, transparency, projects, references, partners, awards, press, exhibitions, and publications, although specific news or announcements are not highlighted in the content provided."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display_summary(urls[0])"
]
},
{
@ -491,30 +603,113 @@
},
{
"cell_type": "code",
"execution_count": null,
"id": "00743dac-0e70-45b7-879a-d7293a6f68a6",
"execution_count": 20,
"id": "856ff857-ba5f-4596-90b9-cd6cee4073dc",
"metadata": {},
"outputs": [],
"source": [
"# Step 1: Create your prompts\n",
"\n",
"system_prompt = \"something here\"\n",
"user_prompt = \"\"\"\n",
" Lots of text\n",
" Can be pasted here\n",
"\"\"\"\n",
"\n",
"# Step 2: Make the messages list\n",
"# Naive extraction of name of the political party from user input\n",
" return \"I can only answer your question concerning the election program of a certain political party. Mention one of 'FDP', 'BSW', 'Grüne', 'Linke', 'SPD', 'CDU' or 'AFD' in your question and I will try my best.\"\n"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "3962d846-ce82-47d2-8c3f-5a6fe296710d",
"metadata": {},
"outputs": [],
"source": [
"from selenium import webdriver\n",
"from selenium.webdriver.common.by import By\n",
"\n",
"def get_election_program(partyname):\n",
" \"\"\"Scrape parties' election programs from the official election website. Naively ignore cookie banner stuff.\"\"\"\n",
"\n",
" # Download the browser driver for your OS and add the path here\n",
" print(f\"This is a question about the political party: {partyname.capitalize()}\")\n",
" \n",
" # Step 1: Create your prompts\n",
" system_prompt = \"Du bist ein neutraler Beobachter, der aufgrund der ihm zur Verfügung gestellten Wahlprogramme Fragen zum Wahlprogramm der verschiedenen Parteien beantwortet. Beantworte Fragen zum Wahlprogramm auf Deutsch. Basiere deine Antwort ausschließlich auf den im Folgenden aufgeführten Informationen.\"\n",