Quality issue with AI shadows when using transparent background via API

Hello,

We’ve been experiencing a major issue with AI shadows when using the transparent background setting through the API. The resulting images have rough edges, making them unusable for our purposes.

After several tests — including a full day spent reproducing the problem in the API Playground — it appears that the issue is not related to background removal, but rather to the combination of transparent background and AI shadows.

Any guidance or fix would be greatly appreciated.

Thank you

Hey @Gian ,

Would it be possible to provide the input images and outputs you are receiving? Would be happy to take a look.

Thanks

Hello @ajalmazanpr,

Thank you for your reply.

After running additional tests, I’ve been able to confirm that the issue is not related to the background removal itself, but specifically to the shadow generation when using a transparent background.

The artifacts appear along the edges of the subject, and in the picture are visible especially around the top contours and the handles of the bag when AI shadows are enabled.

To illustrate this, I’m attaching:

  • the original input image

  • one output without AI soft shadows

  • one output with AI soft shadows

The artifacts are clearly visible in the version with shadows. We haven’t checked it with hard shadows, as we don’t use them in our workflow.

The parameters used for the image with the issue are:

‘outputSize’: ‘originalImage’,
‘padding’: ‘0%’,
‘referenceBox’: ‘originalImage’,
‘shadow.mode’: ‘ai.soft’

When the parameter
‘shadow.mode’: ‘ai.soft’
is removed, the output is clean and shows no edge artifacts.

Thank you for your assistance with this matter.

Gian

Hello @ajalmazanpr,

Just following up on this issue, as it has been a week since I shared the test images and parameters.

Could you please let me know if the team has investigated, and whether there are any updates or an estimated timeline for a fix?

This problem is currently preventing us from using Photoroom in our production workflow, so any update would be greatly appreciated.

Thank you in advance for your help.

Gian

Hi @Gian ,

This is a known model limitation we’re currently working to improve with our machine learning team. In the meanwhile, you can try using our HD background removal parameter.

We recommend this parameter when you want to remove the background of a high-resolution image (≥ 2K) to get more detailed subject edges.

Here’s your original image with your parameters + hd background removal