Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

AI Generate Background with Action and scripts - Photo background replacement automation

Community Beginner ,
Jul 18, 2024 Jul 18, 2024

Hi,

 

Working in Adobe Photoshop Beta with using Contextual task bar

 

I'm having issues with photo automating the process of replacing backgrounds in studio photos with models. I want to automate the workflow using actions and then the image processor.

 

1. Using actions doesn't replicate the precise selection with the Cloud (detailed select) option, even with Select and Mask. The program treats it as a simple "Select Subject," causing the edges of the model to be poorly defined.

I partially solved this by creating an action that works as follows: select subject, open the Select and Mask window (stops here) - manually choose Cloud (detailed results) Select subject, click OK. Then the action continues automatically: fill the selection on the mask, invert the selection, remove from selection. Thus, using delete and inverting colors (D), I remove the background and fill the model on the corrected selection (Cloud (Detailed Results)).

How can I save "Select Subject - Cloud (Detailed Results)" in the action or script?

 

Screenshot 2024-07-18 at 10.48.31.png

 

2. Using the action with the Generative Background in action generates the background with a layer above the cut-out object and blends the selection by about 10px. When done manually, it generates the background on a layer below the cut-out object without blending. The action generates the desired background but blurs the model's edges, distorting the clothes and facial features.

How can I prepare the action so that the layer is generated below the cut-out object?

Screen after used action in attachment

 

I need the Generate Background option because it keeps the edges of the cut-out object intact, and the background is significantly better than using Generative Fill.

As mentioned, the goal is to automate multiple photos. Manual generation is very time-consuming. I'd like to create an action/script and then use batch/image processor to handle a large number of photos, and then open the PSD files one by one to choose the background and edit if necessary.

 

If anyone has any ideas or thoughts on automating the generation and replacement of backgrounds in photos with a white background, I'd be happy to hear them. Thanks in advance for all your input, and I look forward to the discussion 🙂

TOPICS
Actions and scripting , macOS
935
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 18, 2024 Jul 18, 2024

@Daniel Trznadel – I don’t use the beta, so, YMMV.

 

File > Preferences > Image Processing: Select Subject & Remove Background = Cloud (Detailed results)

 

File > Preferences > Image Processing: Selections Processing = More stable

Translate
Adobe
Community Expert ,
Jul 18, 2024 Jul 18, 2024

@Daniel Trznadel – I don’t use the beta, so, YMMV.

 

File > Preferences > Image Processing: Select Subject & Remove Background = Cloud (Detailed results)

 

File > Preferences > Image Processing: Selections Processing = More stable

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 18, 2024 Jul 18, 2024

Hi Stephen_A_Marsh

 

Thanks for correct answer for issue 1. Now action with masking work great 🙂

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2024 Jul 18, 2024

Please post Photoshop Beta-related queries on the Photoshop (Beta) Forum: 

https://community.adobe.com/t5/photoshop-beta/ct-p/ct-photoshop-beta?page=1&sort=latest_replies&filt...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 18, 2024 Jul 18, 2024
LATEST

Ok I remove issue 2. from here and move to this forum, thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines