@umituz/react-native-ai-generation-content 1.17.232 → 1.17.233
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 +1 -1
- 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/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
|
@@ -1,276 +1,445 @@
|
|
|
1
|
-
# AI Kiss
|
|
1
|
+
# AI Kiss Feature
|
|
2
2
|
|
|
3
3
|
Generate AI-powered kiss images between two people.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 📍 Import Path
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Support for various kiss styles
|
|
11
|
-
- High-quality facial matching
|
|
7
|
+
```typescript
|
|
8
|
+
import { useAIKissFeature } from '@umituz/react-native-ai-generation-content';
|
|
9
|
+
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
**Location**: `src/features/ai-kiss/`
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## 🎯 Feature Purpose
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
npm install @umituz/react-native-ai-generation-content
|
|
19
|
-
```
|
|
15
|
+
Create realistic kiss images by combining two photos using AI. Automatically detects poses, positions faces naturally, and generates high-quality facial matching for various kiss types including romantic, gentle, passionate, and cute styles.
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
---
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
## 📋 Usage Strategy
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
import { useAIKissFeature } from '@umituz/react-native-ai-generation-content';
|
|
27
|
-
import * as ImagePicker from 'react-native-image-picker';
|
|
28
|
-
|
|
29
|
-
function AIKissScreen() {
|
|
30
|
-
const [person1, setPerson1] = useState<string | null>(null);
|
|
31
|
-
const [person2, setPerson2] = useState<string | null>(null);
|
|
32
|
-
|
|
33
|
-
const feature = useAIKissFeature({
|
|
34
|
-
config: {
|
|
35
|
-
kissType: 'romantic',
|
|
36
|
-
onProcessingStart: () => console.log('Generating kiss...'),
|
|
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
|
-
<KissTypeSelector
|
|
75
|
-
selectedType={feature.state.kissType}
|
|
76
|
-
onSelectType={feature.setKissType}
|
|
77
|
-
/>
|
|
78
|
-
|
|
79
|
-
<Button
|
|
80
|
-
title="Generate AI Kiss"
|
|
81
|
-
onPress={feature.process}
|
|
82
|
-
disabled={!feature.isReady || feature.state.isProcessing}
|
|
83
|
-
/>
|
|
84
|
-
|
|
85
|
-
{feature.state.isProcessing && (
|
|
86
|
-
<View>
|
|
87
|
-
<Text>Creating your kiss 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 couple photos
|
|
25
|
+
- Generating romantic moments
|
|
26
|
+
- Fun friendship images
|
|
27
|
+
- Social media content
|
|
28
|
+
- Creative personal projects
|
|
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
|
|
104
35
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
36
|
+
### Implementation Strategy
|
|
37
|
+
|
|
38
|
+
1. **Select TWO photos** (person 1 and person 2)
|
|
39
|
+
2. **Choose kiss type** (romantic, gentle, passionate, cute)
|
|
40
|
+
3. **Validate both photos** before generation
|
|
41
|
+
4. **Generate AI kiss** with progress tracking
|
|
42
|
+
5. **Preview result** and offer regeneration
|
|
43
|
+
6. **Save or share** the 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 `kissType` (romantic, gentle, passionate, cute)
|
|
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 kisses 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 kisses 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
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
You are implementing an AI kiss 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 useAIKissFeature hook
|
|
142
|
+
3. Require TWO images (person 1 + person 2)
|
|
143
|
+
4. Implement dual image selection UI
|
|
144
|
+
5. Select kiss type (romantic, gentle, passionate, cute)
|
|
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 kissType: 'romantic' | 'gentle' | 'passionate' | 'cute'
|
|
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
|
+
KISS TYPES:
|
|
171
|
+
- romantic: Intimate, romantic kiss
|
|
172
|
+
- gentle: Soft, gentle kiss
|
|
173
|
+
- passionate: Passionate kiss
|
|
174
|
+
- cute: Adorable, cute kiss
|
|
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
|
|
113
195
|
```
|
|
114
196
|
|
|
115
|
-
|
|
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
|
+
- [ ] Kiss type 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
|
|
116
213
|
|
|
117
|
-
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 🛠️ Configuration Strategy
|
|
217
|
+
|
|
218
|
+
### Essential Configuration
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
// Required fields
|
|
222
|
+
{
|
|
223
|
+
userId: string
|
|
224
|
+
kissType: 'romantic' | 'gentle' | 'passionate' | 'cute'
|
|
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
|
|
129
238
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
239
|
+
1. **Kiss Types**
|
|
240
|
+
- Romantic: Intimate couple kisses
|
|
241
|
+
- Gentle: Soft, tender kisses
|
|
242
|
+
- Passionate: Strong, passionate kisses
|
|
243
|
+
- Cute: Adorable, playful kisses
|
|
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
|
+
- AI kiss 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
|
|
275
|
+
|
|
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
|
+
kissType?: string
|
|
283
|
+
metadata?: any
|
|
135
284
|
}
|
|
136
|
-
```
|
|
137
285
|
|
|
138
|
-
|
|
286
|
+
---
|
|
139
287
|
|
|
140
|
-
|
|
288
|
+
## 🔐 Ethics & Privacy
|
|
141
289
|
|
|
142
|
-
|
|
143
|
-
const result = await feature.process({
|
|
144
|
-
kissType: 'romantic',
|
|
145
|
-
});
|
|
146
|
-
```
|
|
290
|
+
### Consent Requirements
|
|
147
291
|
|
|
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
|
-
|
|
151
|
-
const result = await feature.process({
|
|
152
|
-
kissType: 'gentle',
|
|
153
|
-
});
|
|
154
|
-
```
|
|
297
|
+
### Content Moderation
|
|
155
298
|
|
|
156
|
-
|
|
299
|
+
- **MUST** filter inappropriate content
|
|
300
|
+
- **MUST** prevent malicious use cases
|
|
301
|
+
- **MUST** implement reporting mechanism
|
|
302
|
+
- **MUST** review flagged content
|
|
157
303
|
|
|
158
|
-
|
|
159
|
-
const result = await feature.process({
|
|
160
|
-
kissType: 'passionate',
|
|
161
|
-
});
|
|
162
|
-
```
|
|
304
|
+
### Usage Guidelines
|
|
163
305
|
|
|
164
|
-
|
|
306
|
+
- **MUST** provide terms of service
|
|
307
|
+
- **MUST** clearly label AI-generated content
|
|
308
|
+
- **MUST** prevent deception/misrepresentation
|
|
309
|
+
- **MUST** comply with deepfake regulations
|
|
165
310
|
|
|
166
|
-
|
|
167
|
-
const result = await feature.process({
|
|
168
|
-
kissType: 'cute',
|
|
169
|
-
});
|
|
170
|
-
```
|
|
311
|
+
---
|
|
171
312
|
|
|
172
|
-
##
|
|
313
|
+
## 🎨 Best Practices
|
|
173
314
|
|
|
174
|
-
|
|
175
|
-
2. Select **Person 2** - Choose the second person's photo
|
|
176
|
-
3. Choose **Kiss Type** - Select the style of kiss
|
|
177
|
-
4. Tap **Generate** - Start the AI generation
|
|
178
|
-
5. View Result - See the generated kiss image
|
|
179
|
-
6. Save or Share - Save to gallery or share
|
|
315
|
+
### Photo Selection
|
|
180
316
|
|
|
181
|
-
|
|
317
|
+
1. **Photo Quality**
|
|
318
|
+
- Good: High-quality, well-lit photos
|
|
319
|
+
- Bad: Blurry, dark, low-resolution images
|
|
182
320
|
|
|
183
|
-
|
|
321
|
+
2. **Face Visibility**
|
|
322
|
+
- Good: Clear, frontal face shots
|
|
323
|
+
- Bad: Occluded or profile faces
|
|
184
324
|
|
|
185
|
-
|
|
186
|
-
|
|
325
|
+
3. **Similar Angles**
|
|
326
|
+
- Similar head angles produce better results
|
|
327
|
+
- Forward-facing photos work best
|
|
187
328
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
{ id: 'passionate', name: 'Passionate', preview: '...' },
|
|
192
|
-
{ id: 'cute', name: 'Cute', preview: '...' },
|
|
193
|
-
];
|
|
329
|
+
4. **Lighting**
|
|
330
|
+
- Similar lighting conditions work best
|
|
331
|
+
- Front-facing well-lit photos ideal
|
|
194
332
|
|
|
195
|
-
|
|
196
|
-
styles={kissTypes}
|
|
197
|
-
selectedStyle={selectedKissType}
|
|
198
|
-
onSelectStyle={setSelectedKissType}
|
|
199
|
-
/>
|
|
200
|
-
```
|
|
333
|
+
### User Experience
|
|
201
334
|
|
|
202
|
-
|
|
335
|
+
1. **Clear UI**
|
|
336
|
+
- Label person 1 vs person 2 clearly
|
|
337
|
+
- Show preview before processing
|
|
338
|
+
- Add confirmation dialog
|
|
203
339
|
|
|
204
|
-
|
|
205
|
-
|
|
340
|
+
2. **Error Handling**
|
|
341
|
+
- Explain "no person found" errors
|
|
342
|
+
- Provide troubleshooting tips
|
|
343
|
+
- Offer retry option
|
|
206
344
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
onShare={() => shareImage(feature.state.result.imageUrl)}
|
|
212
|
-
onRegenerate={() => feature.process()}
|
|
213
|
-
/>
|
|
214
|
-
)}
|
|
215
|
-
```
|
|
345
|
+
3. **Performance**
|
|
346
|
+
- Compress images before upload
|
|
347
|
+
- Show progress for long operations
|
|
348
|
+
- Cache results for re-download
|
|
216
349
|
|
|
217
|
-
|
|
350
|
+
---
|
|
218
351
|
|
|
219
|
-
|
|
220
|
-
2. **Face Visibility**: Ensure both faces are clearly visible
|
|
221
|
-
3. **Forward Facing**: Forward-facing photos work best
|
|
222
|
-
4. **Similar Angles**: Similar head angles produce more natural results
|
|
223
|
-
5. **Good Lighting**: Even lighting creates better facial matching
|
|
352
|
+
## 🐛 Common Pitfalls
|
|
224
353
|
|
|
225
|
-
|
|
354
|
+
### Detection Issues
|
|
226
355
|
|
|
227
|
-
|
|
356
|
+
❌ **Problem**: "No person found" error
|
|
357
|
+
✅ **Solution**: Ensure people are clearly visible, well-lit, frontal
|
|
228
358
|
|
|
229
|
-
|
|
230
|
-
// Create romantic kiss images for couples
|
|
231
|
-
const result = await feature.process({
|
|
232
|
-
kissType: 'romantic',
|
|
233
|
-
preserveFaces: true,
|
|
234
|
-
});
|
|
235
|
-
```
|
|
359
|
+
### Quality Issues
|
|
236
360
|
|
|
237
|
-
|
|
361
|
+
❌ **Problem**: Poor quality generation
|
|
362
|
+
✅ **Solution**: Use higher resolution images, better lighting
|
|
238
363
|
|
|
239
|
-
|
|
240
|
-
// Generate fun kiss images
|
|
241
|
-
const result = await feature.process({
|
|
242
|
-
kissType: 'cute',
|
|
243
|
-
enhanceQuality: true,
|
|
244
|
-
});
|
|
245
|
-
```
|
|
364
|
+
### UX Confusion
|
|
246
365
|
|
|
247
|
-
|
|
366
|
+
❌ **Problem**: Users confused about which person is which
|
|
367
|
+
✅ **Solution**: Clear labels, visual indicators, preview
|
|
248
368
|
|
|
249
|
-
|
|
250
|
-
// Create engaging social media content
|
|
251
|
-
const result = await feature.process({
|
|
252
|
-
kissType: 'gentle',
|
|
253
|
-
});
|
|
254
|
-
```
|
|
369
|
+
### Privacy Concerns
|
|
255
370
|
|
|
256
|
-
|
|
371
|
+
❌ **Problem**: Non-consensual image generation
|
|
372
|
+
✅ **Solution**: Implement consent mechanisms, age verification
|
|
257
373
|
|
|
258
|
-
|
|
259
|
-
const { state, process } = useAIKissFeature({ ...config });
|
|
374
|
+
---
|
|
260
375
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
376
|
+
## 📦 Related Components
|
|
377
|
+
|
|
378
|
+
Use these components from the library:
|
|
379
|
+
|
|
380
|
+
- **DualImagePicker**: Select two images
|
|
381
|
+
- **KissTypeSelector**: Choose kiss style
|
|
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 kiss type 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/ai-kiss/`
|
|
426
|
+
- Ethics guidelines: `/docs/ethics.md`
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
**Last Updated**: 2025-01-08
|
|
431
|
+
**Version**: 2.0.0 (Strategy-based Documentation)
|
|
267
432
|
|
|
268
|
-
|
|
433
|
+
---
|
|
269
434
|
|
|
270
|
-
|
|
271
|
-
- [Couple Future](../couple-future) - Generate future couple predictions
|
|
272
|
-
- [Face Swap](../face-swap) - Swap faces between images
|
|
435
|
+
## 📝 Changelog
|
|
273
436
|
|
|
274
|
-
|
|
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
|
|
275
443
|
|
|
276
|
-
|
|
444
|
+
### v1.0.0 - Initial Release
|
|
445
|
+
- Initial feature documentation
|