photo-colorization

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Photo Colorization

照片上色

Transform black and white photographs into vibrant, realistic color images using each::sense. This skill uses AI to intelligently analyze image content and apply historically accurate, contextually appropriate colors.
使用each::sense将黑白照片转换为生动逼真的彩色图像。该技能利用AI智能分析图像内容,并应用符合历史事实、贴合上下文的色彩。

Features

功能特性

  • Automatic Colorization: AI detects subjects and applies natural colors
  • Historical Accuracy: Context-aware coloring for period-appropriate results
  • Portrait Enhancement: Realistic skin tones for faces and portraits
  • Landscape Restoration: Natural colors for outdoor and nature scenes
  • Vintage Photo Revival: Bring old family photos back to life
  • Batch Processing: Colorize multiple photos in sequence
  • Style Preservation: Maintains original photo quality and details
  • 自动上色:AI识别主体并应用自然色彩
  • 历史准确性:基于上下文的上色,结果符合时代特征
  • 肖像增强:为人物肖像呈现逼真肤色
  • 风景修复:为户外和自然场景添加自然色彩
  • 复古照片焕新:让老旧家庭照片重焕生机
  • 批量处理:依次为多张照片上色
  • 风格保留:维持原始照片的质量和细节

Quick Start

快速开始

bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this black and white photo with natural, realistic colors",
    "image_urls": ["https://example.com/bw-photo.jpg"],
    "mode": "max"
  }'
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this black and white photo with natural, realistic colors",
    "image_urls": ["https://example.com/bw-photo.jpg"],
    "mode": "max"
  }'

Common Use Cases

常见使用场景

Use CaseDescriptionBest For
Family ArchivesColorize old family portraits and snapshotsPersonal restoration
Historical DocumentationPeriod-accurate colorization for archivesMuseums, historians
Portrait EnhancementRealistic skin tones and facial featuresProfessional restoration
Landscape RevivalNatural outdoor and scenic colorizationNature photography
Vintage FashionAccurate clothing and fabric colorsFashion archives
Military/War PhotosHistorical military photograph restorationMemorial projects
ArchitectureBuilding and interior colorizationReal estate, heritage
使用场景描述适用场景
家庭档案为老旧家庭肖像和快照上色个人照片修复
历史文档处理为档案资料进行符合时代特征的上色博物馆、历史学家
肖像增强实现逼真肤色和面部特征专业照片修复
风景焕新为户外和风景照片添加自然色彩自然摄影修复
复古时尚还原准确的服装和面料色彩时尚档案整理
军事/战争照片修复历史军事照片纪念项目
建筑为建筑和室内照片上色房地产、文化遗产保护

Use Case Examples

使用场景示例

1. Automatic Colorization

1. 自动上色

Basic colorization with AI-detected colors.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this black and white photograph. Apply natural, realistic colors based on the image content. Maintain the original quality and details.",
    "image_urls": ["https://example.com/old-photo.jpg"],
    "mode": "max"
  }'
基于AI识别色彩的基础上色。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this black and white photograph. Apply natural, realistic colors based on the image content. Maintain the original quality and details.",
    "image_urls": ["https://example.com/old-photo.jpg"],
    "mode": "max"
  }'

2. Historical Photo Colorization

2. 历史照片上色

Colorize with period-appropriate historical accuracy.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this historical photograph from the 1940s. Use period-accurate colors typical of that era - muted tones, authentic clothing colors, and historically appropriate details. This appears to be a street scene.",
    "image_urls": ["https://example.com/1940s-street.jpg"],
    "mode": "max"
  }'
应用符合时代特征的准确色彩进行上色。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this historical photograph from the 1940s. Use period-accurate colors typical of that era - muted tones, authentic clothing colors, and historically appropriate details. This appears to be a street scene.",
    "image_urls": ["https://example.com/1940s-street.jpg"],
    "mode": "max"
  }'

3. Family Portrait Colorization

3. 家庭肖像上色

Bring old family photos to life with warm, natural tones.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this old family portrait photo. Apply natural skin tones, realistic hair colors, and period-appropriate clothing colors. The photo appears to be from the 1950s-1960s era. Make it look warm and inviting.",
    "image_urls": ["https://example.com/family-portrait-bw.jpg"],
    "mode": "max"
  }'
用温暖自然的色调让老旧家庭照片重焕生机。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this old family portrait photo. Apply natural skin tones, realistic hair colors, and period-appropriate clothing colors. The photo appears to be from the 1950s-1960s era. Make it look warm and inviting.",
    "image_urls": ["https://example.com/family-portrait-bw.jpg"],
    "mode": "max"
  }'

4. Landscape Colorization

4. 风景上色

Natural outdoor and scenic colorization.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this black and white landscape photograph. Apply natural colors - blue sky, green foliage, brown earth tones. Make it look like a vibrant summer day while preserving the original composition and atmosphere.",
    "image_urls": ["https://example.com/landscape-bw.jpg"],
    "mode": "max"
  }'
为户外和风景照片添加自然色彩。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this black and white landscape photograph. Apply natural colors - blue sky, green foliage, brown earth tones. Make it look like a vibrant summer day while preserving the original composition and atmosphere.",
    "image_urls": ["https://example.com/landscape-bw.jpg"],
    "mode": "max"
  }'

5. Portrait with Specific Skin Tones

5. 指定肤色的肖像上色

Control skin tone colorization for accurate results.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this portrait photograph. The subject has a medium olive skin tone and dark brown hair. Apply natural, warm skin colors with subtle pink undertones. Eyes appear to be brown. Clothing looks like a dark formal suit.",
    "image_urls": ["https://example.com/portrait-bw.jpg"],
    "mode": "max"
  }'
控制肤色上色以获得准确结果。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this portrait photograph. The subject has a medium olive skin tone and dark brown hair. Apply natural, warm skin colors with subtle pink undertones. Eyes appear to be brown. Clothing looks like a dark formal suit.",
    "image_urls": ["https://example.com/portrait-bw.jpg"],
    "mode": "max"
  }'

6. Vintage Photo Colorization

6. 复古照片上色

Restore old photographs with era-specific styling.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this vintage photograph from the 1920s. Apply colors that match the Art Deco era - rich jewel tones for clothing, sepia-influenced skin tones, and period-appropriate interior colors. Maintain the vintage aesthetic while adding realistic color.",
    "image_urls": ["https://example.com/1920s-vintage.jpg"],
    "mode": "max"
  }'
还原具有时代特色的老旧照片。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this vintage photograph from the 1920s. Apply colors that match the Art Deco era - rich jewel tones for clothing, sepia-influenced skin tones, and period-appropriate interior colors. Maintain the vintage aesthetic while adding realistic color.",
    "image_urls": ["https://example.com/1920s-vintage.jpg"],
    "mode": "max"
  }'

7. War/Military Photo Colorization

7. 战争/军事照片上色

Historical military photograph restoration with accuracy.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this World War II military photograph. Apply historically accurate colors - olive drab for US Army uniforms, appropriate skin tones for the soldiers, realistic equipment colors. Maintain the somber, documentary feel of the original while adding authentic military colors.",
    "image_urls": ["https://example.com/wwii-soldiers.jpg"],
    "mode": "max"
  }'
准确修复历史军事照片。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this World War II military photograph. Apply historically accurate colors - olive drab for US Army uniforms, appropriate skin tones for the soldiers, realistic equipment colors. Maintain the somber, documentary feel of the original while adding authentic military colors.",
    "image_urls": ["https://example.com/wwii-soldiers.jpg"],
    "mode": "max"
  }'

8. Architecture Colorization

8. 建筑上色

Building and interior photograph colorization.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this black and white photograph of a Victorian-era building. Apply appropriate architectural colors - red or brown brick, white trim, dark roof tiles, green copper patina if visible. Include natural sky colors and surrounding landscape elements.",
    "image_urls": ["https://example.com/victorian-building.jpg"],
    "mode": "max"
  }'
为建筑和室内照片上色。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this black and white photograph of a Victorian-era building. Apply appropriate architectural colors - red or brown brick, white trim, dark roof tiles, green copper patina if visible. Include natural sky colors and surrounding landscape elements.",
    "image_urls": ["https://example.com/victorian-building.jpg"],
    "mode": "max"
  }'

9. Fashion/Clothing Colorization

9. 时尚/服装上色

Accurate fabric and fashion colorization.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this 1960s fashion photograph. Apply era-appropriate colors - bold mod colors like orange, turquoise, and pink were popular. The model appears to be wearing a structured dress. Apply realistic fabric textures and vibrant 60s palette.",
    "image_urls": ["https://example.com/1960s-fashion.jpg"],
    "mode": "max"
  }'
准确还原面料和时尚色彩。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Colorize this 1960s fashion photograph. Apply era-appropriate colors - bold mod colors like orange, turquoise, and pink were popular. The model appears to be wearing a structured dress. Apply realistic fabric textures and vibrant 60s palette.",
    "image_urls": ["https://example.com/1960s-fashion.jpg"],
    "mode": "max"
  }'

10. Batch Colorize Multiple Photos

10. 批量为多张照片上色

Process multiple photos with consistent styling using session continuity.
bash
undefined
使用会话连续性批量处理多张照片,保持风格一致。
bash
undefined

First photo in batch

First photo in batch

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Colorize this black and white family photo from the 1950s. Apply warm, natural colors with period-appropriate tones. This is photo 1 of a series from the same family album.", "image_urls": ["https://example.com/family-album-001.jpg"], "session_id": "family-album-colorization", "mode": "max" }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Colorize this black and white family photo from the 1950s. Apply warm, natural colors with period-appropriate tones. This is photo 1 of a series from the same family album.", "image_urls": ["https://example.com/family-album-001.jpg"], "session_id": "family-album-colorization", "mode": "max" }'

Second photo (same session for consistency)

Second photo (same session for consistency)

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Colorize this second photo from the same family album. Maintain consistent skin tones and color style as the previous colorization.", "image_urls": ["https://example.com/family-album-002.jpg"], "session_id": "family-album-colorization", "mode": "max" }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Colorize this second photo from the same family album. Maintain consistent skin tones and color style as the previous colorization.", "image_urls": ["https://example.com/family-album-002.jpg"], "session_id": "family-album-colorization", "mode": "max" }'

Third photo (continuing series)

Third photo (continuing series)

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Colorize the third photo. Same family, same era. Keep the color palette consistent with previous images.", "image_urls": ["https://example.com/family-album-003.jpg"], "session_id": "family-album-colorization", "mode": "max" }'
undefined
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Colorize the third photo. Same family, same era. Keep the color palette consistent with previous images.", "image_urls": ["https://example.com/family-album-003.jpg"], "session_id": "family-album-colorization", "mode": "max" }'
undefined

Best Practices

最佳实践

Image Quality

图像质量

  • Resolution: Higher resolution photos yield better colorization results
  • Contrast: Good contrast in the original helps AI identify details
  • Clarity: Sharp, clear photos colorize better than blurry ones
  • Condition: Digital restoration before colorization can improve results
  • 分辨率:分辨率越高的照片,上色效果越好
  • 对比度:原始照片的对比度良好有助于AI识别细节
  • 清晰度:清晰锐利的照片比模糊的照片上色效果更好
  • 状态:上色前先进行数字修复可提升效果

Prompt Tips

提示词技巧

  • Provide context: Mention the era, location, or subject matter
  • Specify skin tones: If known, describe the subject's complexion
  • Note clothing colors: If you know original colors, include them
  • Describe the scene: Outdoor/indoor, season, time of day
  • 提供上下文:提及时代、地点或主题
  • 指定肤色:如果已知,描述主体的肤色
  • 说明服装颜色:如果知道原始颜色,请包含在内
  • 描述场景:户外/室内、季节、一天中的时间

Historical Accuracy

历史准确性

  • Research the time period for authentic color palettes
  • Consider regional variations in fashion and architecture
  • Military uniforms and equipment have specific documented colors
  • Vintage car and vehicle colors are often well-documented
  • 研究对应时代的真实色彩调色板
  • 考虑时尚和建筑的地域差异
  • 军装和装备有特定的记录色彩
  • 复古汽车和交通工具的颜色通常有详细记录

Mode Selection

模式选择

ModeBest ForSpeedQuality
max
Final restorations, archival work, giftsSlowerHighest
eco
Quick previews, batch testing, draftsFasterGood
Recommendation: Use
eco
mode for initial tests, then
max
for final output.
模式适用场景速度质量
max
最终修复、档案工作、礼品制作较慢最高
eco
快速预览、批量测试、草稿较快良好
推荐:初始测试使用
eco
模式,最终输出使用
max
模式。

Multi-Turn Refinement

多轮优化

Use
session_id
to iterate and refine colorization:
bash
undefined
使用
session_id
迭代优化上色效果:
bash
undefined

Initial colorization

Initial colorization

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Colorize this old portrait photograph with natural colors", "image_urls": ["https://example.com/portrait.jpg"], "session_id": "portrait-restoration" }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Colorize this old portrait photograph with natural colors", "image_urls": ["https://example.com/portrait.jpg"], "session_id": "portrait-restoration" }'

Refine the result

Refine the result

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "The skin tones look a bit too warm. Can you redo the colorization with cooler, more natural skin tones?", "session_id": "portrait-restoration" }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "The skin tones look a bit too warm. Can you redo the colorization with cooler, more natural skin tones?", "session_id": "portrait-restoration" }'

Further adjustment

Further adjustment

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "The dress should be blue, not green. Please adjust the clothing color.", "session_id": "portrait-restoration" }'
undefined
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "The dress should be blue, not green. Please adjust the clothing color.", "session_id": "portrait-restoration" }'
undefined

Error Handling

错误处理

ErrorCauseSolution
Failed to create prediction: HTTP 422
Insufficient balanceTop up at eachlabs.ai
Invalid image URL
URL not accessibleEnsure image URL is publicly accessible
TimeoutLarge image or complex sceneSet client timeout to minimum 10 minutes
Poor colorizationLow quality sourceUse higher resolution, clearer source image
错误原因解决方案
Failed to create prediction: HTTP 422
余额不足在eachlabs.ai进行充值
Invalid image URL
URL无法访问确保图片URL可公开访问
超时图像过大或场景复杂将客户端超时设置为至少10分钟
上色效果差源图像质量低使用更高分辨率、更清晰的源图像

Related Skills

相关技能

  • each-sense
    - Core API documentation
  • image-restoration
    - General image restoration
  • image-enhancement
    - Enhance and upscale images
  • face-restoration
    - Specialized face enhancement
  • each-sense
    - 核心API文档
  • image-restoration
    - 通用图像修复
  • image-enhancement
    - 图像增强与放大
  • face-restoration
    - 专业面部增强