-
Notifications
You must be signed in to change notification settings - Fork 1
/
model.py
100 lines (92 loc) · 3.5 KB
/
model.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
"""Module with the response models."""
from pydantic import BaseModel, Field
class DamageReport(BaseModel):
"""An accident report model."""
vehicle_present: list[bool] = Field(
..., description="Indicates if a vehicle is fully visible in a given image."
)
license_plate_number: str | None = Field(
None, description="License plate number if fully visible."
)
damage_recognized: bool = Field(
..., description="Indicates if damages are recognized on the vehicle."
)
damage_fully_visible: bool = Field(
..., description="Indicates if the damage is fully visible in the images."
)
number_of_valid_images: int = Field(
..., description="Number of valid images used for the evaluation."
)
number_of_unique_vehicles: int = Field(
..., description="Number of unique vehicles visible in the images."
)
is_fire_present: bool = Field(
..., description="Indicates if there are signs of fire."
)
is_glass_damage_present: bool = Field(
..., description="Indicates if there are signs of glass damage."
)
glass_damage_front_windshield: bool = Field(
...,
description="Indicates if there is glass damage on the front windshield.",
)
glass_damage_rear_windshield: bool = Field(
...,
description="Indicates if there is glass damage on the rear windshield.",
)
glass_damage_side_windows: bool = Field(
...,
description="Indicates if there is glass damage on the side windows.",
)
glass_damage_roof_or_panoramic_window: bool = Field(
...,
description="Indicates if there is glass damage on the roof or panoramic "
"windows.",
)
detailed_damage_description: list[str] = Field(
...,
description="Detailed description of the visible damages. "
"Written as if a customer would provide to their insurance company."
"Each damage should be a separate string.",
)
is_collision: bool = Field(
..., description="Indicates if there are signs of a collision."
)
collision_with_object: bool = Field(
...,
description="Indicates if there is a collision with an object.",
)
collision_with_car: bool = Field(
...,
description="Indicates if there is a collision with another car.",
)
collision_with_animal: bool = Field(
...,
description="Indicates if there is a collision with an animal.",
)
collision_other: bool = Field(
...,
description="Indicates if there is a collision with another object.",
)
is_vandalism: bool = Field(
..., description="Indicates if there are signs of vandalism."
)
is_theft: bool = Field(..., description="Indicates if there are signs of theft.")
is_potential_hail_damage: bool = Field(
..., description="Indicates if there are signs of potential hail damage."
)
is_potential_storm_damage: bool = Field(
..., description="Indicates if there are signs of potential_storm damage."
)
is_potential_rockfall_damage: bool = Field(
..., description="Indicates if there are signs of potential_rockfall damage."
)
is_other_damage: bool = Field(
..., description="Indicates if there are signs of other damage."
)
is_person_injured: bool = Field(
..., description="Indicates if a person is injured."
)
estimated_repair_cost: int = Field(
..., description="The estimated repair cost in USD."
)