Skip to content

Commit 7fdfec7

Browse files
authored
Compliance portrait_image issue prio 1 (#937)
* Compliance portrait_image issue prio 1 * Added reference picture for front fender right tesma m3 * Fixed sight tutorial guidelines + reference picture fits available space * Updated local live config with sight tutorial
1 parent a1fbf55 commit 7fdfec7

File tree

10 files changed

+52
-17
lines changed

10 files changed

+52
-17
lines changed

apps/demo-app/src/local-config.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"apiDomain": "api.preview.monk.ai/v1",
1616
"thumbnailDomain": "api.preview.monk.ai/image_resize",
1717
"enableTutorial": "first_time_only",
18-
"enableSightTutorial": "classic",
18+
"enableSightTutorial": "modern",
1919
"startTasksOnComplete": true,
2020
"showCloseButton": false,
2121
"enforceOrientation": "landscape",
@@ -207,6 +207,23 @@
207207
]
208208
}
209209
],
210+
"sightTutorial": [
211+
{
212+
"en": "Kneel or bend low in front of the car, aligned with the grille. Centre the car in the frame, ensuring the front grille, headlights, and registration plate are fully visible. Include the top of the car and the bottom of the bumper in the shot.",
213+
"fr": "Agenouillez-vous ou penchez-vous devant la voiture, aligné avec la calandre. Centrez la voiture dans le cadre, en vous assurant que la calandre avant, les phares et la plaque d'immatriculation soient bien visibles. Veillez à inclure le toit de la voiture et le bas du pare-chocs dans la photo.",
214+
"nl": "Kniel of buk laag voor de auto, uitgelijnd met het rooster. Centreer de auto in het frame, zorg ervoor dat het voorrooster, de koplampen en het kenteken volledig zichtbaar zijn. Zorg ervoor dat de bovenkant van de auto en de onderkant van de bumper in de foto zichtbaar zijn.",
215+
"de": "Knien oder beugen Sie sich vor dem Auto, ausgerichtet mit dem Kühlergrill. Zentrieren Sie das Auto im Bild, sodass der vordere Kühlergrill, die Scheinwerfer und das Nummernschild vollständig sichtbar sind. Achten Sie darauf, dass das Dach des Autos und der untere Teil der Stoßstange im Bild zu sehen sind.",
216+
"imageReferenceBySightId": {
217+
"ffocus18-XlfgjQb9": "https://storage.googleapis.com/core-preview-images/None-8ca68105-1bbc-4f85-84b3-1f5a08e91057.jpeg",
218+
"jgc21-QIvfeg0X": "https://storage.googleapis.com/core-preview-images/None-8ca68105-1bbc-4f85-84b3-1f5a08e91057.jpeg",
219+
"ff150-zXbg0l3z": "https://storage.googleapis.com/core-preview-images/None-8ca68105-1bbc-4f85-84b3-1f5a08e91057.jpeg",
220+
"ftransit18-wyXf7MTv": "https://storage.googleapis.com/core-preview-images/None-8ca68105-1bbc-4f85-84b3-1f5a08e91057.jpeg",
221+
"tsienna20-YwrRNr9n": "https://storage.googleapis.com/core-preview-images/None-8ca68105-1bbc-4f85-84b3-1f5a08e91057.jpeg",
222+
"fesc20-H1dfdfvH": "https://storage.googleapis.com/core-preview-images/None-8ca68105-1bbc-4f85-84b3-1f5a08e91057.jpeg",
223+
"haccord-8YjMcu0D": "https://storage.googleapis.com/core-preview-images/None-8ca68105-1bbc-4f85-84b3-1f5a08e91057.jpeg"
224+
}
225+
}
226+
],
210227
"requiredApiPermissions": [
211228
"monk_core_api:compliances",
212229
"monk_core_api:damage_detection",

packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDSightTutorial/PhotoCaptureHUDSightTutorial.styles.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ export const styles: Styles = {
8383
fontWeight: 700,
8484
},
8585
guidelineContainer: {
86-
height: '40%',
87-
overflow: 'auto',
8886
display: 'flex',
8987
flexDirection: 'column',
9088
padding: '0 30px',
@@ -96,8 +94,6 @@ export const styles: Styles = {
9694
lineHeight: '24px',
9795
},
9896
classicGuidelineContainer: {
99-
height: '40%',
100-
overflow: 'auto',
10197
display: 'flex',
10298
flexDirection: 'column',
10399
padding: '0 30px',
@@ -116,14 +112,16 @@ export const styles: Styles = {
116112
},
117113
closeButtonFiller: { visibility: 'hidden', padding: '0px 20px', height: '100%', borderRadius: 0 },
118114
imageContainer: {
119-
height: '60%',
115+
flexGrow: 1,
116+
overflow: 'hidden',
120117
width: '100%',
121118
display: 'flex',
122119
justifyContent: 'center',
123120
alignItems: 'center',
124121
},
125122
classicImageContainer: {
126-
height: '50%',
123+
flexGrow: 1,
124+
overflow: 'hidden',
127125
width: '100%',
128126
display: 'flex',
129127
justifyContent: 'center',

packages/inspection-capture-web/src/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDSightTutorial/PhotoCaptureHUDSightTutorial.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,13 @@ export function PhotoCaptureHUDSightTutorial({
123123
</div>
124124
<div style={style.classicGuidelineContainer}>
125125
<span style={style.classicGuideline}>
126-
{tutorialGuideline ?? t('photo.hud.sightTutorial.defaultTutorial')}
126+
{tutorialGuideline?.length
127+
? tutorialGuideline
128+
: t(
129+
tutorialImage
130+
? 'photo.hud.sightTutorial.defaultTutorialWithImage'
131+
: 'photo.hud.sightTutorial.defaultTutorialWithoutImage',
132+
)}
127133
</span>
128134
</div>
129135
{tutorialImage && (
@@ -148,7 +154,13 @@ export function PhotoCaptureHUDSightTutorial({
148154
</div>
149155
<div style={style.classicGuidelineContainer}>
150156
<span style={style.guideline}>
151-
{tutorialGuideline ?? t('photo.hud.sightTutorial.defaultTutorial')}
157+
{tutorialGuideline?.length
158+
? tutorialGuideline
159+
: t(
160+
tutorialImage
161+
? 'photo.hud.sightTutorial.defaultTutorialWithImage'
162+
: 'photo.hud.sightTutorial.defaultTutorialWithoutImage',
163+
)}
152164
</span>
153165
</div>
154166
{tutorialImage && (

packages/inspection-capture-web/src/translations/de.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
},
4646
"sightTutorial": {
4747
"tip": "Tipp",
48-
"defaultTutorial": "Positionieren Sie sich wie im linken Diagramm gezeigt und stellen Sie sicher, dass die Kamera auf der richtigen Höhe ist.\nFalls ein Referenzfoto vorhanden ist, versuchen Sie, Ihren Bildausschnitt entsprechend anzupassen."
48+
"defaultTutorialWithImage": "Hier sehen Sie ein Referenzbild.\nBitte versuchen Sie, den Bildausschnitt möglichst genau nachzustellen.",
49+
"defaultTutorialWithoutImage": "Bitte positionieren Sie sich wie in der Abbildung links gezeigt\nund achten Sie darauf, dass sich die Kamera in der richtigen Höhe befindet."
4950
}
5051
},
5152
"gallery": {

packages/inspection-capture-web/src/translations/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
},
4646
"sightTutorial": {
4747
"tip": "Tip",
48-
"defaultTutorial": "Position yourself as shown in the left diagram, ensuring the camera is at the correct height.\nIf a reference photo is provided, try to match your framing accordingly."
48+
"defaultTutorialWithImage": "Here’s a reference image\nTry to match your framing as closely as possible.",
49+
"defaultTutorialWithoutImage": "Position yourself as shown in the left diagram\nEnsuring the camera is at the correct height."
4950
}
5051
},
5152
"gallery": {

packages/inspection-capture-web/src/translations/fr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
},
4646
"sightTutorial": {
4747
"tip": "Conseil",
48-
"defaultTutorial": "Placez-vous comme indiqué dans le schéma de gauche en veillant à ce que la caméra soit à la bonne hauteur.\nSi une photo de référence est fournie, essayez d’adapter votre cadrage en conséquence."
48+
"defaultTutorialWithImage": "Voici une image de référence.\nVeuillez essayer de reproduire le cadrage le plus fidèlement possible.",
49+
"defaultTutorialWithoutImage": "Veuillez vous positionner comme indiqué sur le schéma de gauche,\nen vous assurant que la caméra est à la bonne hauteur."
4950
}
5051
},
5152
"gallery": {

packages/inspection-capture-web/src/translations/nl.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
},
4646
"sightTutorial": {
4747
"tip": "Tip",
48-
"defaultTutorial": "Plaats jezelf zoals aangegeven in het linkerschema en zorg ervoor dat de camera op de juiste hoogte staat.\nAls er een referentiefoto is, probeer dan je kader hierop af te stemmen."
48+
"defaultTutorialWithImage": "Hier ziet u een referentieafbeelding.\nProbeer uw kadrering hier zo goed mogelijk op af te stemmen.",
49+
"defaultTutorialWithoutImage": "Positioneer uzelf zoals aangegeven in het diagram aan de linkerkant\nen zorg ervoor dat de camera zich op de juiste hoogte bevindt."
4950
}
5051
},
5152
"gallery": {

packages/network/test/api/image/mappers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const EXPECTED_DEFAULT_COMPLIANCE_ISSUES = [
2929
];
3030

3131
const EXPECTED_COMPLIANCE_ISSUES_ORDER = [
32+
ComplianceIssue.PORTRAIT_IMAGE,
3233
ComplianceIssue.NO_VEHICLE,
3334
ComplianceIssue.BLURRINESS,
3435
ComplianceIssue.OVEREXPOSURE,
@@ -40,7 +41,6 @@ const EXPECTED_COMPLIANCE_ISSUES_ORDER = [
4041
ComplianceIssue.HIDDEN_PARTS,
4142
ComplianceIssue.MISSING_PARTS,
4243
ComplianceIssue.WRONG_CENTER_PART,
43-
ComplianceIssue.PORTRAIT_IMAGE,
4444
ComplianceIssue.REFLECTIONS,
4545
ComplianceIssue.SNOWNESS,
4646
ComplianceIssue.WETNESS,

packages/sights/research/data/teslam3/teslam3.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@
148148
"label": "front-fender-right",
149149
"overlay": "teslam3-Rn6VqLtY.svg",
150150
"vehicle": "teslam3",
151-
"tasks": ["damage_detection"]
151+
"tasks": ["damage_detection"],
152+
"positioning": {
153+
"position": 317,
154+
"height": "mid"
155+
},
156+
"referencePicture": "https://storage.googleapis.com/monk-sight-images/teslam3-Rn6VqLtY.jpeg"
152157
},
153158
"teslam3-Tk3LpRfJ": {
154159
"id": "teslam3-Tk3LpRfJ",

packages/types/src/state/image.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export enum ComplianceIssue {
199199
* smaller the index, the higher the priority of the compliance issue.
200200
*/
201201
export const COMPLIANCE_ISSUES_PRIORITY = [
202-
// TODO: remove before release
202+
ComplianceIssue.PORTRAIT_IMAGE,
203203
ComplianceIssue.NO_VEHICLE,
204204

205205
ComplianceIssue.BLURRINESS,
@@ -213,7 +213,6 @@ export const COMPLIANCE_ISSUES_PRIORITY = [
213213
ComplianceIssue.HIDDEN_PARTS,
214214
ComplianceIssue.MISSING_PARTS,
215215
ComplianceIssue.WRONG_CENTER_PART,
216-
ComplianceIssue.PORTRAIT_IMAGE,
217216

218217
ComplianceIssue.REFLECTIONS,
219218
ComplianceIssue.SNOWNESS,

0 commit comments

Comments
 (0)