@umituz/react-native-ai-generation-content 1.17.232 → 1.17.234
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +236 -261
- package/package.json +2 -2
- package/src/domains/content-moderation/README.md +239 -296
- package/src/domains/creations/README.md +242 -325
- package/src/domains/face-detection/README.md +228 -307
- package/src/domains/prompts/README.md +242 -312
- package/src/domains/result-preview/index.ts +8 -0
- package/src/domains/result-preview/presentation/components/ResultActionBar.tsx +74 -0
- package/src/domains/result-preview/presentation/components/ResultImageCard.tsx +64 -0
- package/src/domains/result-preview/presentation/components/ResultPreviewScreen.tsx +101 -0
- package/src/domains/result-preview/presentation/components/index.ts +7 -0
- package/src/domains/result-preview/presentation/hooks/index.ts +5 -0
- package/src/domains/result-preview/presentation/hooks/useResultActions.ts +148 -0
- package/src/domains/result-preview/presentation/types/index.ts +5 -0
- package/src/domains/result-preview/presentation/types/result-preview.types.ts +146 -0
- package/src/features/ai-hug/README.md +381 -219
- package/src/features/ai-kiss/README.md +388 -219
- package/src/features/anime-selfie/README.md +327 -256
- package/src/features/audio-generation/README.md +352 -309
- package/src/features/colorization/README.md +332 -228
- package/src/features/couple-future/README.md +387 -212
- package/src/features/future-prediction/README.md +391 -221
- package/src/features/hd-touch-up/README.md +339 -252
- package/src/features/image-captioning/README.md +359 -299
- package/src/features/image-to-image/README.md +398 -357
- package/src/features/image-to-video/README.md +337 -292
- package/src/features/inpainting/README.md +348 -244
- package/src/features/meme-generator/README.md +350 -269
- package/src/features/remove-background/README.md +335 -234
- package/src/features/remove-object/README.md +341 -288
- package/src/features/replace-background/README.md +353 -236
- package/src/features/script-generator/README.md +358 -287
- package/src/features/shared/README.md +254 -223
- package/src/features/sketch-to-image/README.md +331 -234
- package/src/features/style-transfer/README.md +336 -237
- package/src/features/text-to-video/README.md +360 -193
- package/src/features/text-to-voice/README.md +382 -272
- package/src/index.ts +3 -0
|
@@ -1,270 +1,445 @@
|
|
|
1
|
-
# Couple Future
|
|
1
|
+
# Couple Future Feature
|
|
2
2
|
|
|
3
3
|
Generate images showing couples in future scenarios using AI.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 📍 Import Path
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- High-quality facial matching
|
|
11
|
-
- Romantic and heartwarming results
|
|
7
|
+
```typescript
|
|
8
|
+
import { useCoupleFutureGeneration } from '@umituz/react-native-ai-generation-content';
|
|
9
|
+
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
**Location**: `src/features/couple-future/`
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## 🎯 Feature Purpose
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
npm install @umituz/react-native-ai-generation-content
|
|
19
|
-
```
|
|
15
|
+
Create AI-generated images showing couples in various future scenarios including wedding day, old age, anniversary celebrations, and family moments. Features natural aging progression and high-quality facial matching for heartwarming results.
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
---
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
## 📋 Usage Strategy
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
import { useCoupleFutureGeneration } from '@umituz/react-native-ai-generation-content';
|
|
27
|
-
import * as ImagePicker from 'react-native-image-picker';
|
|
28
|
-
|
|
29
|
-
function CoupleFutureScreen() {
|
|
30
|
-
const [person1, setPerson1] = useState<string | null>(null);
|
|
31
|
-
const [person2, setPerson2] = useState<string | null>(null);
|
|
32
|
-
|
|
33
|
-
const feature = useCoupleFutureGeneration({
|
|
34
|
-
config: {
|
|
35
|
-
scenario: 'wedding',
|
|
36
|
-
onProcessingStart: () => console.log('Generating future image...'),
|
|
37
|
-
onProcessingComplete: (result) => console.log('Complete:', result),
|
|
38
|
-
onError: (error) => console.error('Error:', error),
|
|
39
|
-
},
|
|
40
|
-
onSelectPerson1: async () => {
|
|
41
|
-
const result = await ImagePicker.launchImageLibrary({ mediaType: 'photo' });
|
|
42
|
-
if (result.assets && result.assets[0].uri) {
|
|
43
|
-
const base64 = await convertToBase64(result.assets[0].uri);
|
|
44
|
-
setPerson1(base64);
|
|
45
|
-
return base64;
|
|
46
|
-
}
|
|
47
|
-
return null;
|
|
48
|
-
},
|
|
49
|
-
onSelectPerson2: async () => {
|
|
50
|
-
const result = await ImagePicker.launchImageLibrary({ mediaType: 'photo' });
|
|
51
|
-
if (result.assets && result.assets[0].uri) {
|
|
52
|
-
const base64 = await convertToBase64(result.assets[0].uri);
|
|
53
|
-
setPerson2(base64);
|
|
54
|
-
return base64;
|
|
55
|
-
}
|
|
56
|
-
return null;
|
|
57
|
-
},
|
|
58
|
-
onSaveResult: async (imageUrl) => {
|
|
59
|
-
await saveToGallery(imageUrl);
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<View>
|
|
65
|
-
<DualImagePicker
|
|
66
|
-
sourceImage={person1}
|
|
67
|
-
targetImage={person2}
|
|
68
|
-
onSelectSourceImage={feature.selectPerson1}
|
|
69
|
-
onSelectTargetImage={feature.selectPerson2}
|
|
70
|
-
sourceLabel="Person 1"
|
|
71
|
-
targetLabel="Person 2"
|
|
72
|
-
/>
|
|
73
|
-
|
|
74
|
-
<ScenarioSelector
|
|
75
|
-
selectedScenario={feature.state.scenario}
|
|
76
|
-
onSelectScenario={feature.setScenario}
|
|
77
|
-
/>
|
|
78
|
-
|
|
79
|
-
<Button
|
|
80
|
-
title="Generate Future Image"
|
|
81
|
-
onPress={feature.process}
|
|
82
|
-
disabled={!feature.isReady || feature.state.isProcessing}
|
|
83
|
-
/>
|
|
84
|
-
|
|
85
|
-
{feature.state.isProcessing && (
|
|
86
|
-
<View>
|
|
87
|
-
<Text>Creating your future image...</Text>
|
|
88
|
-
<ProgressBar progress={feature.state.progress} />
|
|
89
|
-
</View>
|
|
90
|
-
)}
|
|
91
|
-
|
|
92
|
-
{feature.state.result && (
|
|
93
|
-
<Image source={{ uri: feature.state.result.imageUrl }} />
|
|
94
|
-
)}
|
|
95
|
-
</View>
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
```
|
|
21
|
+
### When to Use This Feature
|
|
99
22
|
|
|
100
|
-
|
|
23
|
+
✅ **Use Cases:**
|
|
24
|
+
- Creating fun future predictions with partners
|
|
25
|
+
- Generating anniversary content
|
|
26
|
+
- Social media couple content
|
|
27
|
+
- Creative romantic projects
|
|
28
|
+
- Gift ideas for couples
|
|
101
29
|
|
|
102
|
-
|
|
103
|
-
|
|
30
|
+
❌ **When NOT to Use:**
|
|
31
|
+
- Non-consensual image generation
|
|
32
|
+
- Misleading or deceptive content
|
|
33
|
+
- Harassment or bullying
|
|
34
|
+
- Commercial use without permissions
|
|
35
|
+
|
|
36
|
+
### Implementation Strategy
|
|
37
|
+
|
|
38
|
+
1. **Select TWO photos** (person 1 and person 2)
|
|
39
|
+
2. **Choose future scenario** (wedding, old-age, anniversary, family)
|
|
40
|
+
3. **Validate both photos** before generation
|
|
41
|
+
4. **Generate future image** with progress tracking
|
|
42
|
+
5. **Preview result** and offer regeneration
|
|
43
|
+
6. **Save or share** final image
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## ⚠️ Critical Rules (MUST FOLLOW)
|
|
48
|
+
|
|
49
|
+
### 1. Image Requirements
|
|
50
|
+
- **MUST** provide TWO distinct images (person 1 + person 2)
|
|
51
|
+
- **MUST** contain at least one visible person in each image
|
|
52
|
+
- **MUST** use high-quality images (min 512x512 recommended)
|
|
53
|
+
- **MUST** ensure faces are clearly visible
|
|
54
|
+
- **MUST NOT** use images with no detectable people
|
|
55
|
+
|
|
56
|
+
### 2. Configuration
|
|
57
|
+
- **MUST** provide valid `userId` for tracking
|
|
58
|
+
- **MUST** specify `scenario` (wedding, old-age, anniversary, family)
|
|
59
|
+
- **MUST** implement `onError` callback
|
|
60
|
+
- **MUST** implement `onSelectPerson1` and `onSelectPerson2` callbacks
|
|
61
|
+
- **MUST** handle both images being selected before processing
|
|
62
|
+
|
|
63
|
+
### 3. State Management
|
|
64
|
+
- **MUST** check `isReady` before enabling generate button
|
|
65
|
+
- **MUST** verify both images are selected
|
|
66
|
+
- **MUST** handle `isProcessing` state to prevent duplicate requests
|
|
67
|
+
- **MUST** display `error` state to users
|
|
68
|
+
- **MUST** implement proper cleanup on unmount
|
|
69
|
+
|
|
70
|
+
### 4. Performance
|
|
71
|
+
- **MUST** limit image size (<10MB each)
|
|
72
|
+
- **MUST** compress images before processing
|
|
73
|
+
- **MUST** implement loading indicators during processing
|
|
74
|
+
- **MUST** cache results locally
|
|
75
|
+
- **MUST NOT** generate multiple futures simultaneously
|
|
76
|
+
|
|
77
|
+
### 5. Ethics & Privacy
|
|
78
|
+
- **MUST** obtain consent from people whose photos are used
|
|
79
|
+
- **MUST** provide clear usage terms
|
|
80
|
+
- **MUST** implement content moderation
|
|
81
|
+
- **MUST** prevent malicious use cases
|
|
82
|
+
- **MUST** log processing for audit trail
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 🚫 Prohibitions (MUST AVOID)
|
|
87
|
+
|
|
88
|
+
### Strictly Forbidden
|
|
89
|
+
|
|
90
|
+
❌ **NEVER** do the following:
|
|
91
|
+
|
|
92
|
+
1. **No Single Image**
|
|
93
|
+
- Always requires TWO images (person 1 + person 2)
|
|
94
|
+
- Never attempt with missing image
|
|
95
|
+
|
|
96
|
+
2. **No Non-Consensual Generation**
|
|
97
|
+
- Always obtain permission from subjects
|
|
98
|
+
- Never generate futures without consent
|
|
99
|
+
- Implement age verification for minors
|
|
100
|
+
|
|
101
|
+
3. **No Malicious Use**
|
|
102
|
+
- Never use for harassment or bullying
|
|
103
|
+
- Never create misleading content
|
|
104
|
+
- Never use for deception
|
|
105
|
+
|
|
106
|
+
4. **No Unhandled Errors**
|
|
107
|
+
- Never ignore generation failures
|
|
108
|
+
- Always handle detection errors gracefully
|
|
109
|
+
- Provide clear error messages
|
|
110
|
+
|
|
111
|
+
5. **No Memory Leaks**
|
|
112
|
+
- Never store large images in state unnecessarily
|
|
113
|
+
- Always cleanup image references on unmount
|
|
114
|
+
- Implement proper image disposal
|
|
115
|
+
|
|
116
|
+
6. **No Blocked UI**
|
|
117
|
+
- Never process without user confirmation
|
|
118
|
+
- Always show progress indicator
|
|
119
|
+
- Never block main thread with image processing
|
|
120
|
+
|
|
121
|
+
7. **No Missing Context**
|
|
122
|
+
- Never confuse which person is which
|
|
123
|
+
- Always provide clear UI labels
|
|
124
|
+
- Show preview before processing
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 🤖 AI Agent Directions
|
|
129
|
+
|
|
130
|
+
### For AI Code Generation Tools
|
|
131
|
+
|
|
132
|
+
When using this feature with AI code generation tools, follow these guidelines:
|
|
133
|
+
|
|
134
|
+
#### Prompt Template for AI Agents
|
|
104
135
|
|
|
105
|
-
function App() {
|
|
106
|
-
return (
|
|
107
|
-
<AIFeatureScreen
|
|
108
|
-
featureId="couple-future"
|
|
109
|
-
userId="user-123"
|
|
110
|
-
/>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
136
|
```
|
|
137
|
+
You are implementing a couple future generation feature using @umituz/react-native-ai-generation-content.
|
|
138
|
+
|
|
139
|
+
REQUIREMENTS:
|
|
140
|
+
1. Import from: @umituz/react-native-ai-generation-content
|
|
141
|
+
2. Use the useCoupleFutureGeneration hook
|
|
142
|
+
3. Require TWO images (person 1 + person 2)
|
|
143
|
+
4. Implement dual image selection UI
|
|
144
|
+
5. Select future scenario (wedding, old-age, anniversary, family)
|
|
145
|
+
6. Validate both images before generation
|
|
146
|
+
7. Add confirmation dialog before generation
|
|
147
|
+
8. Handle long processing times with progress
|
|
148
|
+
9. Implement proper error handling
|
|
149
|
+
10. Implement cleanup on unmount
|
|
150
|
+
|
|
151
|
+
CRITICAL RULES:
|
|
152
|
+
- MUST obtain consent from subjects
|
|
153
|
+
- MUST validate both images before processing
|
|
154
|
+
- MUST provide clear UI for person 1 vs person 2
|
|
155
|
+
- MUST handle generation errors gracefully
|
|
156
|
+
- MUST prevent malicious use cases
|
|
157
|
+
- MUST implement content moderation
|
|
158
|
+
- NEVER process without user confirmation
|
|
159
|
+
|
|
160
|
+
CONFIGURATION:
|
|
161
|
+
- Provide valid userId (string)
|
|
162
|
+
- Set scenario: 'wedding' | 'old-age' | 'anniversary' | 'family'
|
|
163
|
+
- Set preserveFaces: boolean (maintain facial features)
|
|
164
|
+
- Set enhanceQuality: boolean (enhance output quality)
|
|
165
|
+
- Implement onSelectPerson1 callback
|
|
166
|
+
- Implement onSelectPerson2 callback
|
|
167
|
+
- Implement onSaveResult callback
|
|
168
|
+
- Configure callbacks: onProcessingStart, onProcessingComplete, onError
|
|
169
|
+
|
|
170
|
+
SCENARIOS:
|
|
171
|
+
- wedding: Couples on their wedding day
|
|
172
|
+
- old-age: The couple as elderly
|
|
173
|
+
- anniversary: Celebrating an anniversary
|
|
174
|
+
- family: The couple with a family
|
|
175
|
+
|
|
176
|
+
OPTIONS:
|
|
177
|
+
- preserveFaces: Maintain facial features (default: true)
|
|
178
|
+
- enhanceQuality: Enhance output quality (default: true)
|
|
179
|
+
|
|
180
|
+
STRICTLY FORBIDDEN:
|
|
181
|
+
- No single image processing
|
|
182
|
+
- No non-consensual generation
|
|
183
|
+
- No malicious use
|
|
184
|
+
- No unhandled errors
|
|
185
|
+
- No memory leaks
|
|
186
|
+
- No missing UI context
|
|
187
|
+
|
|
188
|
+
ETHICS CHECKLIST:
|
|
189
|
+
- [ ] Consent mechanism implemented
|
|
190
|
+
- [ ] Age verification for minors
|
|
191
|
+
- [ ] Content moderation in place
|
|
192
|
+
- [ ] Usage terms provided
|
|
193
|
+
- [ ] Audit trail logging
|
|
194
|
+
- [ ] Report/flag functionality
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### AI Implementation Checklist
|
|
198
|
+
|
|
199
|
+
Use this checklist when generating code:
|
|
200
|
+
|
|
201
|
+
- [ ] Feature imported from correct path
|
|
202
|
+
- [ ] Dual image selection implemented
|
|
203
|
+
- [ ] Person 1/Person 2 labels clear
|
|
204
|
+
- [ ] Future scenario selector added
|
|
205
|
+
- [ ] Both images validated before processing
|
|
206
|
+
- [ ] Confirmation dialog added
|
|
207
|
+
- [ ] Progress indicator during processing
|
|
208
|
+
- [ ] Error display with user-friendly message
|
|
209
|
+
- [ ] Result preview before saving
|
|
210
|
+
- [ ] Consent mechanism in place
|
|
211
|
+
- [ ] Cleanup on unmount
|
|
212
|
+
- [ ] Content moderation configured
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 🛠️ Configuration Strategy
|
|
114
217
|
|
|
115
|
-
|
|
218
|
+
### Essential Configuration
|
|
116
219
|
|
|
117
|
-
|
|
220
|
+
```typescript
|
|
221
|
+
// Required fields
|
|
222
|
+
{
|
|
223
|
+
userId: string
|
|
224
|
+
scenario: 'wedding' | 'old-age' | 'anniversary' | 'family'
|
|
225
|
+
onSelectPerson1: () => Promise<string | null>
|
|
226
|
+
onSelectPerson2: () => Promise<string | null>
|
|
227
|
+
}
|
|
118
228
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
onError?: (error: string) => void;
|
|
229
|
+
// Optional callbacks
|
|
230
|
+
{
|
|
231
|
+
onProcessingStart?: () => void
|
|
232
|
+
onProcessingComplete?: (result) => void
|
|
233
|
+
onError?: (error: string) => void
|
|
125
234
|
}
|
|
126
235
|
```
|
|
127
236
|
|
|
128
|
-
###
|
|
237
|
+
### Recommended Settings
|
|
238
|
+
|
|
239
|
+
1. **Future Scenarios**
|
|
240
|
+
- Wedding: Romantic wedding day imagery
|
|
241
|
+
- Old Age: Realistic aging progression
|
|
242
|
+
- Anniversary: Celebration scenes
|
|
243
|
+
- Family: Couple with children
|
|
244
|
+
|
|
245
|
+
2. **Image Quality**
|
|
246
|
+
- Minimum: 512x512 resolution
|
|
247
|
+
- Recommended: 1024x1024 or higher
|
|
248
|
+
- Format: JPEG or PNG
|
|
249
|
+
- Max size: 10MB per image
|
|
250
|
+
|
|
251
|
+
3. **Performance Settings**
|
|
252
|
+
- Compress images before upload
|
|
253
|
+
- Show progress for long operations
|
|
254
|
+
- Implement timeout (120s default)
|
|
255
|
+
- Enable result caching
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 📊 State Management
|
|
260
|
+
|
|
261
|
+
### Feature States
|
|
262
|
+
|
|
263
|
+
**isReady**: boolean
|
|
264
|
+
- Both images selected and validated
|
|
265
|
+
- Check before enabling generate button
|
|
266
|
+
|
|
267
|
+
**isProcessing**: boolean
|
|
268
|
+
- Future generation in progress
|
|
269
|
+
- Show loading/progress indicator
|
|
270
|
+
- Disable generate button
|
|
271
|
+
|
|
272
|
+
**progress**: number (0-100)
|
|
273
|
+
- Generation progress percentage
|
|
274
|
+
- Update progress bar
|
|
129
275
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
276
|
+
**error**: string | null
|
|
277
|
+
- Error message if generation failed
|
|
278
|
+
- Common errors: "No person found in image", "Generation failed"
|
|
279
|
+
|
|
280
|
+
**result**: {
|
|
281
|
+
imageUrl: string
|
|
282
|
+
scenario?: string
|
|
283
|
+
metadata?: any
|
|
135
284
|
}
|
|
136
|
-
```
|
|
137
285
|
|
|
138
|
-
|
|
286
|
+
---
|
|
139
287
|
|
|
140
|
-
|
|
288
|
+
## 🔐 Ethics & Privacy
|
|
141
289
|
|
|
142
|
-
|
|
290
|
+
### Consent Requirements
|
|
143
291
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
```
|
|
292
|
+
- **MUST** obtain explicit consent from all subjects
|
|
293
|
+
- **MUST** provide clear explanation of how images will be used
|
|
294
|
+
- **MUST** implement age verification
|
|
295
|
+
- **MUST** allow subjects to opt-out
|
|
149
296
|
|
|
150
|
-
###
|
|
297
|
+
### Content Moderation
|
|
151
298
|
|
|
152
|
-
|
|
299
|
+
- **MUST** filter inappropriate content
|
|
300
|
+
- **MUST** prevent malicious use cases
|
|
301
|
+
- **MUST** implement reporting mechanism
|
|
302
|
+
- **MUST** review flagged content
|
|
153
303
|
|
|
154
|
-
|
|
155
|
-
const result = await feature.process({
|
|
156
|
-
scenario: 'old-age',
|
|
157
|
-
});
|
|
158
|
-
```
|
|
304
|
+
### Usage Guidelines
|
|
159
305
|
|
|
160
|
-
|
|
306
|
+
- **MUST** provide terms of service
|
|
307
|
+
- **MUST** clearly label AI-generated content
|
|
308
|
+
- **MUST** prevent deception/misrepresentation
|
|
309
|
+
- **MUST** comply with deepfake regulations
|
|
161
310
|
|
|
162
|
-
|
|
311
|
+
---
|
|
163
312
|
|
|
164
|
-
|
|
165
|
-
const result = await feature.process({
|
|
166
|
-
scenario: 'anniversary',
|
|
167
|
-
});
|
|
168
|
-
```
|
|
313
|
+
## 🎨 Best Practices
|
|
169
314
|
|
|
170
|
-
###
|
|
315
|
+
### Photo Selection
|
|
171
316
|
|
|
172
|
-
|
|
317
|
+
1. **Photo Quality**
|
|
318
|
+
- Good: High-quality, well-lit photos
|
|
319
|
+
- Bad: Blurry, dark, low-resolution images
|
|
173
320
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
});
|
|
178
|
-
```
|
|
321
|
+
2. **Face Visibility**
|
|
322
|
+
- Good: Clear, frontal face shots
|
|
323
|
+
- Bad: Occluded or profile faces
|
|
179
324
|
|
|
180
|
-
|
|
325
|
+
3. **Similar Angles**
|
|
326
|
+
- Similar head angles produce better results
|
|
327
|
+
- Forward-facing photos work best
|
|
181
328
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
4. Tap **Generate** - Start the AI generation
|
|
186
|
-
5. View Result - See the future prediction
|
|
187
|
-
6. Save or Share - Save to gallery or share
|
|
329
|
+
4. **Lighting**
|
|
330
|
+
- Similar lighting conditions work best
|
|
331
|
+
- Front-facing well-lit photos ideal
|
|
188
332
|
|
|
189
|
-
|
|
333
|
+
### User Experience
|
|
190
334
|
|
|
191
|
-
|
|
335
|
+
1. **Clear UI**
|
|
336
|
+
- Label person 1 vs person 2 clearly
|
|
337
|
+
- Show preview before processing
|
|
338
|
+
- Add confirmation dialog
|
|
192
339
|
|
|
193
|
-
|
|
194
|
-
|
|
340
|
+
2. **Error Handling**
|
|
341
|
+
- Explain "no person found" errors
|
|
342
|
+
- Provide troubleshooting tips
|
|
343
|
+
- Offer retry option
|
|
195
344
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
{ id: 'family', name: 'Family', preview: '...' },
|
|
201
|
-
];
|
|
345
|
+
3. **Performance**
|
|
346
|
+
- Compress images before upload
|
|
347
|
+
- Show progress for long operations
|
|
348
|
+
- Cache results for re-download
|
|
202
349
|
|
|
203
|
-
|
|
204
|
-
styles={scenarios}
|
|
205
|
-
selectedStyle={selectedScenario}
|
|
206
|
-
onSelectStyle={setSelectedScenario}
|
|
207
|
-
/>
|
|
208
|
-
```
|
|
350
|
+
---
|
|
209
351
|
|
|
210
|
-
|
|
352
|
+
## 🐛 Common Pitfalls
|
|
211
353
|
|
|
212
|
-
|
|
213
|
-
import { ResultImageCard } from '@umituz/react-native-ai-generation-content';
|
|
354
|
+
### Detection Issues
|
|
214
355
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
imageUrl={feature.state.result.imageUrl}
|
|
218
|
-
onSave={() => feature.saveResult()}
|
|
219
|
-
onShare={() => shareImage(feature.state.result.imageUrl)}
|
|
220
|
-
onRegenerate={() => feature.process()}
|
|
221
|
-
/>
|
|
222
|
-
)}
|
|
223
|
-
```
|
|
356
|
+
❌ **Problem**: "No person found" error
|
|
357
|
+
✅ **Solution**: Ensure people are clearly visible, well-lit, frontal
|
|
224
358
|
|
|
225
|
-
|
|
359
|
+
### Quality Issues
|
|
226
360
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
3. **Forward Facing**: Forward-facing photos work best
|
|
230
|
-
4. **Similar Angles**: Similar head angles produce better results
|
|
231
|
-
5. **Good Lighting**: Even lighting creates more natural results
|
|
361
|
+
❌ **Problem**: Poor quality generation
|
|
362
|
+
✅ **Solution**: Use higher resolution images, better lighting
|
|
232
363
|
|
|
233
|
-
|
|
364
|
+
### UX Confusion
|
|
234
365
|
|
|
235
|
-
|
|
366
|
+
❌ **Problem**: Users confused about which person is which
|
|
367
|
+
✅ **Solution**: Clear labels, visual indicators, preview
|
|
236
368
|
|
|
237
|
-
|
|
238
|
-
// Create fun future predictions with your partner
|
|
239
|
-
const result = await feature.process({
|
|
240
|
-
scenario: 'wedding',
|
|
241
|
-
});
|
|
242
|
-
```
|
|
369
|
+
### Privacy Concerns
|
|
243
370
|
|
|
244
|
-
|
|
371
|
+
❌ **Problem**: Non-consensual image generation
|
|
372
|
+
✅ **Solution**: Implement consent mechanisms, age verification
|
|
245
373
|
|
|
246
|
-
|
|
247
|
-
// Share couple future predictions on social media
|
|
248
|
-
const result = await feature.process({
|
|
249
|
-
scenario: 'old-age',
|
|
250
|
-
});
|
|
251
|
-
```
|
|
374
|
+
---
|
|
252
375
|
|
|
253
|
-
|
|
376
|
+
## 📦 Related Components
|
|
254
377
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
378
|
+
Use these components from the library:
|
|
379
|
+
|
|
380
|
+
- **DualImagePicker**: Select two images
|
|
381
|
+
- **ScenarioSelector**: Choose future scenario
|
|
382
|
+
- **ResultImageCard**: Display result with actions
|
|
383
|
+
- **ConfirmationDialog**: Confirm before processing
|
|
384
|
+
|
|
385
|
+
Located at: `src/presentation/components/`
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## 🔄 Migration Strategy
|
|
390
|
+
|
|
391
|
+
If migrating from previous implementation:
|
|
392
|
+
|
|
393
|
+
1. **Update imports** to new path
|
|
394
|
+
2. **Add dual image selection** (person 1 + person 2)
|
|
395
|
+
3. **Implement consent mechanism**
|
|
396
|
+
4. **Add scenario selector**
|
|
397
|
+
5. **Update state handling** for both images
|
|
398
|
+
6. **Test all error cases**
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## ⚖️ Legal Considerations
|
|
403
|
+
|
|
404
|
+
### Compliance
|
|
405
|
+
|
|
406
|
+
- **Deepfake Regulations**: Comply with local laws
|
|
407
|
+
- **Privacy Laws**: GDPR, CCPA compliance
|
|
408
|
+
- **Consent Requirements**: Explicit permission needed
|
|
409
|
+
- **Age Restrictions**: Verify adult subjects
|
|
410
|
+
- **Content Labeling**: Mark as AI-generated
|
|
411
|
+
|
|
412
|
+
### Best Practices
|
|
413
|
+
|
|
414
|
+
- Provide attribution for source images
|
|
415
|
+
- Allow content reporting/flagging
|
|
416
|
+
- Implement audit trail logging
|
|
417
|
+
- Cooperate with takedown requests
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
## 📚 Additional Resources
|
|
422
|
+
|
|
423
|
+
- Main documentation: `/docs/`
|
|
424
|
+
- API reference: `/docs/api/`
|
|
425
|
+
- Examples: `/docs/examples/basic/couple-future/`
|
|
426
|
+
- Ethics guidelines: `/docs/ethics.md`
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
**Last Updated**: 2025-01-08
|
|
431
|
+
**Version**: 2.0.0 (Strategy-based Documentation)
|
|
261
432
|
|
|
262
|
-
|
|
433
|
+
---
|
|
263
434
|
|
|
264
|
-
|
|
265
|
-
- [AI Kiss](../ai-kiss) - Generate AI kiss images
|
|
266
|
-
- [Face Swap](../face-swap) - Swap faces between images
|
|
435
|
+
## 📝 Changelog
|
|
267
436
|
|
|
268
|
-
|
|
437
|
+
### v2.0.0 - 2025-01-08
|
|
438
|
+
- **BREAKING**: Documentation format changed to strategy-based
|
|
439
|
+
- Removed extensive code examples
|
|
440
|
+
- Added ethics and privacy guidelines
|
|
441
|
+
- Added rules, prohibitions, and AI agent directions
|
|
442
|
+
- Focus on responsible AI usage
|
|
269
443
|
|
|
270
|
-
|
|
444
|
+
### v1.0.0 - Initial Release
|
|
445
|
+
- Initial feature documentation
|