Skip to content

Commit 73e7dbf

Browse files
authored
Merge branch 'main' into Oct25-reveiw-updates
2 parents 38ba25f + 92c7fe6 commit 73e7dbf

File tree

38 files changed

+2184
-89
lines changed

38 files changed

+2184
-89
lines changed

β€Žai-data-strategy/README.mdβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AI Data Strategy
2+
3+
Oracle AI Data Strategy material and resources.
4+
5+
# License
6+
7+
Copyright (c) 2025 Oracle and/or its affiliates.
8+
9+
Licensed under the Universal Permissive License (UPL), Version 1.0.
10+
11+
See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/LICENSE.txt) for more details.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Enablement Asssets
2+
AI and Data Strategy enablement presentations
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2025 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
# πŸš— Insurance Image/Video Analyzer β€” OCI GenAI
2+
3+
A Streamlit-based multimodal application that analyzes **vehicle images or videos** for insurance claim triage using **Oracle Generative AI**.
4+
5+
This tool allows insurance professionals and adjusters to upload accident images or a short video clip, and receive a concise, expert-style report summarizing vehicle condition, visible damages, and safety concerns β€” all generated through a single multimodal LLM call.
6+
7+
**Author:** Ali Ottoman
8+
**Reviewed date:** 13.10.2025
9+
10+
---
11+
12+
## πŸ”§ Features
13+
14+
### Unified Image & Video Analysis
15+
- Upload multiple **images**, a single **video**.
16+
- For videos: frames are extracted automatically (at a user-set interval) and analyzed **collectively** in one final pass (per 10 frames).
17+
- Generates one unified report summarizing all perspectives.
18+
19+
### Insurance-Focused Vehicle Damage Report
20+
- Custom prompt tuned for **insurance adjuster** workflows.
21+
- Structured output covering:
22+
- Vehicle details (make, model, color, visible plates)
23+
- Damage assessment by section (front, rear, sides, roof, wheels)
24+
- Safety & driveability insights
25+
- ADAS & sensor recalibration notes
26+
- Prior damage indicators
27+
- Concise summary for claims review
28+
29+
### Multimodal LLM (Llama 4 Maverick)
30+
- Performs reasoning across **all frames and views** to remove duplicates and highlight consistent damage regions.
31+
- Handles both still images and continuous video input.
32+
- Supports temperature control and token limit configuration.
33+
34+
### Streamlit Front-End
35+
- Simple upload interface with thumbnail previews.
36+
- Real-time progress indicators and structured results display.
37+
- Sidebar controls for frame interval, max frames, and temperature.
38+
39+
---
40+
41+
## πŸ‘₯ Who Can Use This
42+
43+
**Insurance Adjusters & Claims Teams**
44+
β†’ Rapidly review visual evidence from claim submissions with a single summarized analysis.
45+
46+
**Fleet Managers & Repair Centers**
47+
β†’ Assess damage consistency across multiple images or dashcam videos.
48+
49+
**Developers & AI Engineers**
50+
β†’ Extend or integrate the workflow into enterprise insurance platforms on OCI.
51+
52+
---
53+
54+
## πŸ—‚οΈ Files & Structure
55+
56+
```
57+
.
58+
β”œβ”€β”€ motor-insurance-chatbot.py # Main Streamlit app
59+
β”œβ”€β”€ config.py # OCI config & model IDs (user-provided)
60+
β”œβ”€β”€ requirements.txt # Python dependencies
61+
└── README.md # You're reading it
62+
```
63+
64+
---
65+
66+
## βš™οΈ Setup & Installation
67+
68+
### 1. Clone the Repository
69+
```bash
70+
git clone https://github.com/your-username/your-repo.git
71+
cd your-repo
72+
```
73+
74+
### 2. Configure OCI Credentials
75+
Edit your `config.py` file:
76+
77+
```python
78+
# config.py
79+
COMPARTMENT_ID = "<your OCI Compartment OCID>"
80+
MODEL_ID = ["meta.llama-4-maverick-17b-128e-instruct-fp8"]
81+
```
82+
83+
Ensure your OCI credentials file (`~/.oci/config`) is correctly configured with API keys and region.
84+
85+
### 3. Install Requirements
86+
```bash
87+
pip install -r requirements.txt
88+
```
89+
90+
---
91+
92+
## πŸš€ Run the App
93+
```bash
94+
streamlit run motor-insurance-chatbot.py
95+
```
96+
97+
---
98+
99+
## πŸ“ How to Use
100+
101+
1. **Upload your files**
102+
β†’ Images (`.jpg`, `.png`) or one video (`.mp4`, `.avi`, `.mov`)
103+
β†’ PDFs are also supported (converted to images internally)
104+
105+
2. **Set parameters**
106+
- Choose frame extraction interval (default = 12)
107+
- Limit total frames (default = 120)
108+
- Adjust temperature (default = 0 for deterministic outputs)
109+
110+
3. **Ask your question**
111+
Example queries:
112+
- β€œDescribe the visible vehicle damages.”
113+
- β€œSummarize the safety concerns.”
114+
- β€œWhat parts likely need recalibration?”
115+
116+
4. **View results**
117+
β†’ The app displays:
118+
- Frame thumbnails
119+
- A single final LLM report combining all inputs
120+
- Structured markdown-formatted sections
121+
122+
---
123+
124+
## πŸ› οΈ Customization
125+
126+
- Modify `INSURANCE_PROMPT` to tailor report tone or add fields (e.g., **cost estimate**, **liability hints**, **repair recommendations**).
127+
- Adjust `MAX_VIDEO_FRAMES` and `MAX_TOKENS` for performance vs detail.
128+
- Add export features (CSV, PDF) via Streamlit’s `st.download_button`.
129+
130+
---
131+
132+
## 🧠 Example Interaction
133+
134+
**You:** *Describe visible damages and safety concerns.*
135+
136+
**AI (Maverick):**
137+
> **Vehicle Details:** Red Toyota Corolla 2021, rear plate visible.
138+
> **Damage Assessment:** Moderate rear bumper impact with scratched paint; left taillight cracked; minor dent on rear quarter panel.
139+
> **Safety & Driveability:** Lights partially damaged but vehicle likely drivable; no airbag deployment visible.
140+
> **Summary:** Rear collision impact focused on left side; requires bumper and light replacement.
141+
142+
---
143+
144+
## πŸ”§ OCI Services Used
145+
146+
1. **OCI Generative AI – Llama 4 Maverick**
147+
β†’ Multimodal text + image/video reasoning
148+
```python
149+
from langchain_community.chat_models.oci_generative_ai import ChatOCIGenAI
150+
```
151+
152+
---
153+
154+
## πŸ”— Docs & References
155+
156+
πŸ“˜ [OCI Generative AI Overview](https://docs.oracle.com/en-us/iaas/Content/generative-ai/home.htm)
157+
158+
---
159+
160+
## πŸ“„ License
161+
162+
Copyright (c) 2025 Oracle and/or its affiliates.
163+
**MIT License** β€” see `LICENSE` for details.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
config file
3+
4+
- Add the OCID of your compartment
5+
"""
6+
7+
COMPARTMENT_ID = ""
8+
9+
MODEL_ID = [
10+
"meta.llama-4-maverick-17b-128e-instruct-fp8",
11+
"meta.llama-4-scout-17b-16e-instruct"]

0 commit comments

Comments
Β (0)