@umituz/react-native-ai-generation-content 1.17.229 → 1.17.230
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/LICENSE +21 -0
- package/README.md +346 -0
- package/package.json +1 -3
- package/src/domain/README.md +503 -0
- package/src/domains/content-moderation/README.md +363 -0
- package/src/domains/creations/README.md +394 -0
- package/src/domains/face-detection/README.md +395 -0
- package/src/domains/prompts/README.md +387 -0
- package/src/features/ai-hug/README.md +276 -0
- package/src/features/ai-kiss/README.md +276 -0
- package/src/features/anime-selfie/README.md +325 -0
- package/src/features/audio-generation/README.md +370 -0
- package/src/features/colorization/README.md +289 -0
- package/src/features/couple-future/README.md +270 -0
- package/src/features/face-swap/README.md +234 -0
- package/src/features/future-prediction/README.md +281 -0
- package/src/features/hd-touch-up/README.md +309 -0
- package/src/features/image-captioning/README.md +361 -0
- package/src/features/image-to-image/README.md +418 -0
- package/src/features/image-to-video/README.md +369 -0
- package/src/features/inpainting/README.md +302 -0
- package/src/features/meme-generator/README.md +327 -0
- package/src/features/photo-restoration/README.md +286 -0
- package/src/features/remove-background/README.md +292 -0
- package/src/features/remove-object/README.md +352 -0
- package/src/features/replace-background/README.md +288 -0
- package/src/features/script-generator/README.md +362 -0
- package/src/features/shared/README.md +280 -0
- package/src/features/sketch-to-image/README.md +296 -0
- package/src/features/style-transfer/README.md +301 -0
- package/src/features/text-to-image/README.md +228 -0
- package/src/features/text-to-video/README.md +245 -0
- package/src/features/text-to-voice/README.md +335 -0
- package/src/features/upscaling/README.md +247 -0
- package/src/infrastructure/config/README.md +310 -0
- package/src/infrastructure/middleware/README.md +378 -0
- package/src/infrastructure/orchestration/README.md +362 -0
- package/src/infrastructure/services/README.md +382 -0
- package/src/infrastructure/utils/README.md +523 -0
- package/src/infrastructure/wrappers/README.md +336 -0
- package/src/presentation/components/README.md +535 -0
- package/src/presentation/hooks/README.md +380 -0
- package/src/presentation/layouts/README.md +374 -0
- package/src/presentation/screens/README.md +430 -0
- package/src/presentation/layouts/types/.npmignore.tmp +0 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Future Prediction
|
|
2
|
+
|
|
3
|
+
Generate images showing people in future scenarios using AI.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Create future predictions for individuals
|
|
8
|
+
- Multiple future scenarios (success, old age, etc.)
|
|
9
|
+
- Natural aging and progression
|
|
10
|
+
- Various life scenarios
|
|
11
|
+
- High-quality facial matching
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
This feature is part of `@umituz/react-native-ai-generation-content`.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @umituz/react-native-ai-generation-content
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Basic Usage
|
|
22
|
+
|
|
23
|
+
### Using the Hook
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { useFuturePrediction } from '@umituz/react-native-ai-generation-content';
|
|
27
|
+
import * as ImagePicker from 'react-native-image-picker';
|
|
28
|
+
|
|
29
|
+
function FuturePredictionScreen() {
|
|
30
|
+
const [image, setImage] = useState<string | null>(null);
|
|
31
|
+
|
|
32
|
+
const feature = useFuturePrediction({
|
|
33
|
+
config: {
|
|
34
|
+
scenario: 'old-age',
|
|
35
|
+
onProcessingStart: () => console.log('Generating future image...'),
|
|
36
|
+
onProcessingComplete: (result) => console.log('Complete:', result),
|
|
37
|
+
onError: (error) => console.error('Error:', error),
|
|
38
|
+
},
|
|
39
|
+
onSelectImage: async () => {
|
|
40
|
+
const result = await ImagePicker.launchImageLibrary({ mediaType: 'photo' });
|
|
41
|
+
if (result.assets && result.assets[0].uri) {
|
|
42
|
+
const base64 = await convertToBase64(result.assets[0].uri);
|
|
43
|
+
setImage(base64);
|
|
44
|
+
return base64;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
},
|
|
48
|
+
onSaveResult: async (imageUrl) => {
|
|
49
|
+
await saveToGallery(imageUrl);
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<View>
|
|
55
|
+
<PhotoUploadCard
|
|
56
|
+
image={image}
|
|
57
|
+
onSelectImage={feature.selectImage}
|
|
58
|
+
title="Select Your Photo"
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
<ScenarioSelector
|
|
62
|
+
selectedScenario={feature.state.scenario}
|
|
63
|
+
onSelectScenario={feature.setScenario}
|
|
64
|
+
/>
|
|
65
|
+
|
|
66
|
+
<Button
|
|
67
|
+
title="Generate Future Image"
|
|
68
|
+
onPress={feature.process}
|
|
69
|
+
disabled={!feature.isReady || feature.state.isProcessing}
|
|
70
|
+
/>
|
|
71
|
+
|
|
72
|
+
{feature.state.isProcessing && (
|
|
73
|
+
<View>
|
|
74
|
+
<Text>Creating your future image...</Text>
|
|
75
|
+
<ProgressBar progress={feature.state.progress} />
|
|
76
|
+
</View>
|
|
77
|
+
)}
|
|
78
|
+
|
|
79
|
+
{feature.state.result && (
|
|
80
|
+
<ResultDisplay
|
|
81
|
+
originalImage={image}
|
|
82
|
+
resultImage={feature.state.result.imageUrl}
|
|
83
|
+
onSave={() => feature.saveResult()}
|
|
84
|
+
/>
|
|
85
|
+
)}
|
|
86
|
+
</View>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Using the Unified AI Feature Screen
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { AIFeatureScreen } from '@umituz/react-native-ai-generation-content';
|
|
95
|
+
|
|
96
|
+
function App() {
|
|
97
|
+
return (
|
|
98
|
+
<AIFeatureScreen
|
|
99
|
+
featureId="future-prediction"
|
|
100
|
+
userId="user-123"
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Configuration Options
|
|
107
|
+
|
|
108
|
+
### Feature Config
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
interface FuturePredictionFeatureConfig {
|
|
112
|
+
scenario?: 'old-age' | 'success' | 'future-career' | 'future-family';
|
|
113
|
+
age?: number; // Target age for prediction (optional)
|
|
114
|
+
onProcessingStart?: () => void;
|
|
115
|
+
onProcessingComplete?: (result: FuturePredictionResult) => void;
|
|
116
|
+
onError?: (error: string) => void;
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Generation Options
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
interface FuturePredictionOptions {
|
|
124
|
+
scenario: 'old-age' | 'success' | 'future-career' | 'future-family';
|
|
125
|
+
age?: number; // Target age
|
|
126
|
+
preserveFaces?: boolean; // Maintain facial features (default: true)
|
|
127
|
+
enhanceQuality?: boolean; // Enhance output quality (default: true)
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Future Scenarios
|
|
132
|
+
|
|
133
|
+
### Old Age
|
|
134
|
+
|
|
135
|
+
See yourself in old age:
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
const result = await feature.process({
|
|
139
|
+
scenario: 'old-age',
|
|
140
|
+
age: 80,
|
|
141
|
+
});
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Success
|
|
145
|
+
|
|
146
|
+
Professional success scenario:
|
|
147
|
+
|
|
148
|
+
```tsx
|
|
149
|
+
const result = await feature.process({
|
|
150
|
+
scenario: 'success',
|
|
151
|
+
});
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Future Career
|
|
155
|
+
|
|
156
|
+
In a dream career:
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
const result = await feature.process({
|
|
160
|
+
scenario: 'future-career',
|
|
161
|
+
});
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Future Family
|
|
165
|
+
|
|
166
|
+
With a future family:
|
|
167
|
+
|
|
168
|
+
```tsx
|
|
169
|
+
const result = await feature.process({
|
|
170
|
+
scenario: 'future-family',
|
|
171
|
+
});
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Usage Flow
|
|
175
|
+
|
|
176
|
+
1. Select **Photo** - Choose a current photo
|
|
177
|
+
2. Choose **Scenario** - Select the future scenario
|
|
178
|
+
3. Set **Age** (optional) - Target age for old age prediction
|
|
179
|
+
4. Tap **Generate** - Start the AI generation
|
|
180
|
+
5. View Result - See the future prediction
|
|
181
|
+
6. Save or Share - Save to gallery or share
|
|
182
|
+
|
|
183
|
+
## Component Examples
|
|
184
|
+
|
|
185
|
+
### Scenario Selector
|
|
186
|
+
|
|
187
|
+
```tsx
|
|
188
|
+
import { StylePresetsGrid } from '@umituz/react-native-ai-generation-content';
|
|
189
|
+
|
|
190
|
+
const scenarios = [
|
|
191
|
+
{ id: 'old-age', name: 'Old Age', preview: '...' },
|
|
192
|
+
{ id: 'success', name: 'Success', preview: '...' },
|
|
193
|
+
{ id: 'future-career', name: 'Dream Career', preview: '...' },
|
|
194
|
+
{ id: 'future-family', name: 'Future Family', preview: '...' },
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
<StylePresetsGrid
|
|
198
|
+
styles={scenarios}
|
|
199
|
+
selectedStyle={selectedScenario}
|
|
200
|
+
onSelectStyle={setSelectedScenario}
|
|
201
|
+
/>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Age Input
|
|
205
|
+
|
|
206
|
+
```tsx
|
|
207
|
+
import { Slider } from 'react-native';
|
|
208
|
+
|
|
209
|
+
<Slider
|
|
210
|
+
minimumValue={50}
|
|
211
|
+
maximumValue={100}
|
|
212
|
+
step={1}
|
|
213
|
+
value={age}
|
|
214
|
+
onValueChange={setAge}
|
|
215
|
+
/>
|
|
216
|
+
|
|
217
|
+
<Text>Target Age: {age}</Text>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Result Display with Actions
|
|
221
|
+
|
|
222
|
+
```tsx
|
|
223
|
+
import { ResultImageCard } from '@umituz/react-native-ai-generation-content';
|
|
224
|
+
|
|
225
|
+
{feature.state.result && (
|
|
226
|
+
<ResultImageCard
|
|
227
|
+
imageUrl={feature.state.result.imageUrl}
|
|
228
|
+
onSave={() => feature.saveResult()}
|
|
229
|
+
onShare={() => shareImage(feature.state.result.imageUrl)}
|
|
230
|
+
onRegenerate={() => feature.process()}
|
|
231
|
+
/>
|
|
232
|
+
)}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Best Practices
|
|
236
|
+
|
|
237
|
+
1. **Photo Quality**: Use high-quality, well-lit photos
|
|
238
|
+
2. **Face Visibility**: Ensure the face is clearly visible
|
|
239
|
+
3. **Forward Facing**: Forward-facing photos work best
|
|
240
|
+
4. **Good Lighting**: Even lighting creates more natural results
|
|
241
|
+
5. **Realistic Expectations**: Results are AI-generated predictions
|
|
242
|
+
|
|
243
|
+
## Use Cases
|
|
244
|
+
|
|
245
|
+
### Fun & Entertainment
|
|
246
|
+
|
|
247
|
+
```tsx
|
|
248
|
+
// Create fun future predictions
|
|
249
|
+
const result = await feature.process({
|
|
250
|
+
scenario: 'old-age',
|
|
251
|
+
age: 75,
|
|
252
|
+
});
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Social Media Content
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
// Share future predictions on social media
|
|
259
|
+
const result = await feature.process({
|
|
260
|
+
scenario: 'success',
|
|
261
|
+
});
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Motivation
|
|
265
|
+
|
|
266
|
+
```tsx
|
|
267
|
+
// Visualize future success
|
|
268
|
+
const result = await feature.process({
|
|
269
|
+
scenario: 'future-career',
|
|
270
|
+
});
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Related Features
|
|
274
|
+
|
|
275
|
+
- [Couple Future](../couple-future) - Generate future couple predictions
|
|
276
|
+
- [AI Hug](../ai-hug) - Generate AI hug images
|
|
277
|
+
- [Face Swap](../face-swap) - Swap faces between images
|
|
278
|
+
|
|
279
|
+
## License
|
|
280
|
+
|
|
281
|
+
MIT
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# HD Touch Up
|
|
2
|
+
|
|
3
|
+
Apply high-detail enhancements to images using AI.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Enhance image quality and details
|
|
8
|
+
- Sharpen and clarify images
|
|
9
|
+
- Reduce noise and artifacts
|
|
10
|
+
- Improve facial features in portraits
|
|
11
|
+
- Add professional polish
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
This feature is part of `@umituz/react-native-ai-generation-content`.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @umituz/react-native-ai-generation-content
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Basic Usage
|
|
22
|
+
|
|
23
|
+
### Using the Hook
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { useHDTouchUpFeature } from '@umituz/react-native-ai-generation-content';
|
|
27
|
+
import * as ImagePicker from 'react-native-image-picker';
|
|
28
|
+
|
|
29
|
+
function HDTouchUpScreen() {
|
|
30
|
+
const [image, setImage] = useState<string | null>(null);
|
|
31
|
+
|
|
32
|
+
const feature = useHDTouchUpFeature({
|
|
33
|
+
config: {
|
|
34
|
+
enhancementLevel: 'medium',
|
|
35
|
+
enhanceFaces: true,
|
|
36
|
+
onProcessingStart: () => console.log('Enhancing image...'),
|
|
37
|
+
onProcessingComplete: (result) => console.log('Complete:', result),
|
|
38
|
+
onError: (error) => console.error('Error:', error),
|
|
39
|
+
},
|
|
40
|
+
onSelectImage: 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
|
+
setImage(base64);
|
|
45
|
+
return base64;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
},
|
|
49
|
+
onSaveResult: async (imageUrl) => {
|
|
50
|
+
await saveToGallery(imageUrl);
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<View>
|
|
56
|
+
<PhotoUploadCard
|
|
57
|
+
image={image}
|
|
58
|
+
onSelectImage={feature.selectImage}
|
|
59
|
+
title="Select Image to Enhance"
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
<EnhancementLevelSelector
|
|
63
|
+
selectedLevel={feature.state.enhancementLevel}
|
|
64
|
+
onSelectLevel={feature.setEnhancementLevel}
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
<Button
|
|
68
|
+
title="Enhance Image"
|
|
69
|
+
onPress={feature.process}
|
|
70
|
+
disabled={!feature.isReady || feature.state.isProcessing}
|
|
71
|
+
/>
|
|
72
|
+
|
|
73
|
+
{feature.state.isProcessing && (
|
|
74
|
+
<View>
|
|
75
|
+
<Text>Enhancing image...</Text>
|
|
76
|
+
<ProgressBar progress={feature.state.progress} />
|
|
77
|
+
</View>
|
|
78
|
+
)}
|
|
79
|
+
|
|
80
|
+
{feature.state.result && (
|
|
81
|
+
<ResultDisplay
|
|
82
|
+
originalImage={image}
|
|
83
|
+
resultImage={feature.state.result.imageUrl}
|
|
84
|
+
onSave={() => feature.saveResult()}
|
|
85
|
+
/>
|
|
86
|
+
)}
|
|
87
|
+
</View>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Using the Unified AI Feature Screen
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
import { AIFeatureScreen } from '@umituz/react-native-ai-generation-content';
|
|
96
|
+
|
|
97
|
+
function App() {
|
|
98
|
+
return (
|
|
99
|
+
<AIFeatureScreen
|
|
100
|
+
featureId="hd-touch-up"
|
|
101
|
+
userId="user-123"
|
|
102
|
+
/>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Configuration Options
|
|
108
|
+
|
|
109
|
+
### Feature Config
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
interface HDTouchUpFeatureConfig {
|
|
113
|
+
enhancementLevel?: 'low' | 'medium' | 'high';
|
|
114
|
+
enhanceFaces?: boolean; // Apply face-specific enhancements
|
|
115
|
+
denoise?: boolean; // Reduce image noise
|
|
116
|
+
sharpen?: boolean; // Sharpen details
|
|
117
|
+
onProcessingStart?: () => void;
|
|
118
|
+
onProcessingComplete?: (result: HDTouchUpResult) => void;
|
|
119
|
+
onError?: (error: string) => void;
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Enhancement Options
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
interface HDTouchUpOptions {
|
|
127
|
+
enhancementLevel: 'low' | 'medium' | 'high';
|
|
128
|
+
enhanceFaces?: boolean;
|
|
129
|
+
denoise?: boolean; // Remove noise and grain
|
|
130
|
+
sharpen?: boolean; // Enhance edges and details
|
|
131
|
+
adjustColors?: boolean; // Improve color vibrancy
|
|
132
|
+
adjustContrast?: boolean; // Enhance contrast and tones
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Enhancement Levels
|
|
137
|
+
|
|
138
|
+
### Low Enhancement
|
|
139
|
+
|
|
140
|
+
Subtle improvements, natural look:
|
|
141
|
+
|
|
142
|
+
```tsx
|
|
143
|
+
const result = await feature.process({
|
|
144
|
+
enhancementLevel: 'low',
|
|
145
|
+
sharpen: true,
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Medium Enhancement
|
|
150
|
+
|
|
151
|
+
Balanced improvements, noticeable but natural:
|
|
152
|
+
|
|
153
|
+
```tsx
|
|
154
|
+
const result = await feature.process({
|
|
155
|
+
enhancementLevel: 'medium',
|
|
156
|
+
enhanceFaces: true,
|
|
157
|
+
denoise: true,
|
|
158
|
+
sharpen: true,
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### High Enhancement
|
|
163
|
+
|
|
164
|
+
Strong enhancements, professional quality:
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
const result = await feature.process({
|
|
168
|
+
enhancementLevel: 'high',
|
|
169
|
+
enhanceFaces: true,
|
|
170
|
+
denoise: true,
|
|
171
|
+
sharpen: true,
|
|
172
|
+
adjustColors: true,
|
|
173
|
+
adjustContrast: true,
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Usage Flow
|
|
178
|
+
|
|
179
|
+
1. Select **Image** - Choose an image to enhance
|
|
180
|
+
2. Choose **Enhancement Level** - Select intensity
|
|
181
|
+
3. Configure **Options** - Toggle specific enhancements
|
|
182
|
+
4. Tap **Enhance** - Start the enhancement
|
|
183
|
+
5. View **Result** - See the enhanced image
|
|
184
|
+
6. Save or Share - Save or share the result
|
|
185
|
+
|
|
186
|
+
## Component Examples
|
|
187
|
+
|
|
188
|
+
### Enhancement Level Selector
|
|
189
|
+
|
|
190
|
+
```tsx
|
|
191
|
+
import { GridSelector } from '@umituz/react-native-ai-generation-content';
|
|
192
|
+
|
|
193
|
+
const levels = [
|
|
194
|
+
{ id: 'low', name: 'Subtle', description: 'Light enhancements' },
|
|
195
|
+
{ id: 'medium', name: 'Balanced', description: 'Moderate enhancements' },
|
|
196
|
+
{ id: 'high', name: 'Strong', description: 'Maximum enhancements' },
|
|
197
|
+
];
|
|
198
|
+
|
|
199
|
+
<GridSelector
|
|
200
|
+
options={levels}
|
|
201
|
+
selectedOption={selectedLevel}
|
|
202
|
+
onSelectOption={setSelectedLevel}
|
|
203
|
+
/>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Enhancement Toggles
|
|
207
|
+
|
|
208
|
+
```tsx
|
|
209
|
+
import { Switch } from 'react-native';
|
|
210
|
+
|
|
211
|
+
<View>
|
|
212
|
+
<Switch
|
|
213
|
+
value={enhanceFaces}
|
|
214
|
+
onValueChange={setEnhanceFaces}
|
|
215
|
+
/>
|
|
216
|
+
<Text>Enhance Faces</Text>
|
|
217
|
+
|
|
218
|
+
<Switch
|
|
219
|
+
value={denoise}
|
|
220
|
+
onValueChange={setDenoise}
|
|
221
|
+
/>
|
|
222
|
+
<Text>Reduce Noise</Text>
|
|
223
|
+
|
|
224
|
+
<Switch
|
|
225
|
+
value={sharpen}
|
|
226
|
+
onValueChange={setSharpen}
|
|
227
|
+
/>
|
|
228
|
+
<Text>Sharpen Details</Text>
|
|
229
|
+
</View>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Before/After Comparison
|
|
233
|
+
|
|
234
|
+
```tsx
|
|
235
|
+
import { ResultDisplay } from '@umituz/react-native-ai-generation-content';
|
|
236
|
+
|
|
237
|
+
{feature.state.result && image && (
|
|
238
|
+
<ResultDisplay
|
|
239
|
+
originalImage={image}
|
|
240
|
+
resultImage={feature.state.result.imageUrl}
|
|
241
|
+
onSave={() => feature.saveResult()}
|
|
242
|
+
onShare={() => shareImage(feature.state.result.imageUrl)}
|
|
243
|
+
/>
|
|
244
|
+
)}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Use Cases
|
|
248
|
+
|
|
249
|
+
### Portrait Enhancement
|
|
250
|
+
|
|
251
|
+
```tsx
|
|
252
|
+
// Enhance portrait photos
|
|
253
|
+
const result = await feature.process({
|
|
254
|
+
enhancementLevel: 'high',
|
|
255
|
+
enhanceFaces: true,
|
|
256
|
+
adjustColors: true,
|
|
257
|
+
});
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Product Photos
|
|
261
|
+
|
|
262
|
+
```tsx
|
|
263
|
+
// Improve product image quality
|
|
264
|
+
const result = await feature.process({
|
|
265
|
+
enhancementLevel: 'medium',
|
|
266
|
+
sharpen: true,
|
|
267
|
+
adjustColors: true,
|
|
268
|
+
});
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Landscape Enhancement
|
|
272
|
+
|
|
273
|
+
```tsx
|
|
274
|
+
// Enhance landscape details
|
|
275
|
+
const result = await feature.process({
|
|
276
|
+
enhancementLevel: 'medium',
|
|
277
|
+
sharpen: true,
|
|
278
|
+
adjustContrast: true,
|
|
279
|
+
});
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Old Photo Restoration
|
|
283
|
+
|
|
284
|
+
```tsx
|
|
285
|
+
// Improve old photo quality
|
|
286
|
+
const result = await feature.process({
|
|
287
|
+
enhancementLevel: 'high',
|
|
288
|
+
denoise: true,
|
|
289
|
+
sharpen: true,
|
|
290
|
+
});
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Best Practices
|
|
294
|
+
|
|
295
|
+
1. **Enhancement Level**: Start with Medium for most photos
|
|
296
|
+
2. **Face Enhancement**: Enable for portraits, disable for other subjects
|
|
297
|
+
3. **Noise Reduction**: Useful for low-light or high-ISO photos
|
|
298
|
+
4. **Sharpening**: Be careful not to over-sharpen
|
|
299
|
+
5. **Color Adjustment**: Works well for faded or dull photos
|
|
300
|
+
|
|
301
|
+
## Related Features
|
|
302
|
+
|
|
303
|
+
- [Photo Restoration](../photo-restoration) - Restore old photos
|
|
304
|
+
- [Upscaling](../upscaling) - Increase image resolution
|
|
305
|
+
- [Colorization](../colorization) - Add color to B&W photos
|
|
306
|
+
|
|
307
|
+
## License
|
|
308
|
+
|
|
309
|
+
MIT
|