Star removal - Comparing pure Starnet vs Starnet+Photoshop "Content Aware fill"

19 replies1k views
arjan brussee avatar
i found out this little technique, thought i'd share.

Removing stars with the otherwise great Starnet++ tool in PI often generates badly stamped out artifacts.   Sure you can clonestamp it away, but that's a lot of manual work.

I've just started doing this trick:
  1. Use Starnet++ in PI to create a starmask.
  2. At the end of my PI processing steps, I Import both the stretched Nebula+stars, as well as starmask into Photoshop .
  3. (You probably want to create another star layer with fixed up stars for later "addition" to the starless Nebula image, but the original Starnet++ starmask is needed to remove stars)
  4. Add the starmask as a layer on top of the Nebula+Stars
  5. On the starmask, select the black with magic wand (turn anti-aliasing off). Then, invert the mask. Now you have all the stars selected.
  6. Now select the Nebula+Stars since that's the layer you want to remove stars on.
  7. Then, just do Edit->Content Aware Fill.   This will remove the stars and fill in the gaps with "smart" pixels from the other part of the image.


Here's a comparison of the results.




I do not know if PI has a similar "smart" content aware fill, would be great to know.

I haven't used it on a final processed image yet, for this one https://www.astrobin.com/yfk4ja/ i used some judicious stamping in PS to get rid of some of the bigger artifacts around removed stars before re-adding a subdued star field.

cheers
-arjan
Helpful Engaging
Mike Cranfield avatar
An interesting approach.  Thanks for sharing.  I will have to give it a go.
Well Written Respectful
Tim Hutchison avatar
Sounds like it should be great! I'll have to give it a try. I'll let you know my results. Thanks for the post!
Well Written
rhedden avatar
I was considering doing something similar in GIMP - using StarNet++ just to generate a mask for further procesing.  Glad someone else sees the value in this technique.

Since you're using Photoshop, you might want to take a look at Russell Croman's site and read about his new Photoshop plugin for star removal.  It looks absolutely great, and it might make the StarNet++ approach obsolete in a hurry.

https://www.rc-astro.com/resources/StarXTerminator/
Well Written Insightful Respectful Concise Supportive
arjan brussee avatar
I was considering doing something similar in GIMP - using StarNet++ just to generate a mask for further procesing.  Glad someone else sees the value in this technique.

Since you're using Photoshop, you might want to take a look at Russell Croman's site and read about his new Photoshop plugin for star removal.  It looks absolutely great, and it might make the StarNet++ approach obsolete in a hurry.

https://www.rc-astro.com/resources/StarXTerminator/

ah thanks for the link, i'll give that a try as well.  I did notice on some "grainier" picture that also makes a weird pattern, but at least it doesnt have the big brightness issue compared to starnet removal
Stephan Linhart avatar
I tried the StarXTerminator and the method described by Arjan. I have to say both work better than Starnet++. However the Photoshop procedure takes a bit of tinkering and it takes a while to complete the operations to actually see if your tinkering has gone in the right direction.

StarXTerminator also can produce very bad results when starts are too dominant.

Will continue to test both ways as I never really was satisfied with Starnet on many of my pictures.

Here first result with StarXTerminator:
Cocoon Nebula


Cheers.

Stephan
Helpful Engaging
Dale Penkala avatar
I was considering doing something similar in GIMP - using StarNet++ just to generate a mask for further procesing.  Glad someone else sees the value in this technique.

Since you're using Photoshop, you might want to take a look at Russell Croman's site and read about his new Photoshop plugin for star removal.  It looks absolutely great, and it might make the StarNet++ approach obsolete in a hurry.

https://www.rc-astro.com/resources/StarXTerminator/

I wish there was a plugin for Gimp, this looks like an amazing tool!

Dale
David Redwine avatar
Dale,

  A Windows standalone version of Starnet can be downloaded from Source Forge.  

  You can also use Straton,  https://zipproth.de/Straton/
Dale Penkala avatar
Tim Hutchison avatar
I used this technique on this imageof IC1795. I think it performed pretty well. I did use the "Expand Mask" function to expand the selection a few pixels after inverting the selection, and had a few (maybe 20 or so) areas that I had to clean up with the patch tool, but it was at least as good as Starnet and maybe a little bit better.

I'd appreciate any feedback.
Tim.
Dale Penkala avatar
Tim Hutchison:
I used this technique on this imageof IC1795. I think it performed pretty well. I did use the "Expand Mask" function to expand the selection a few pixels after inverting the selection, and had a few (maybe 20 or so) areas that I had to clean up with the patch tool, but it was at least as good as Starnet and maybe a little bit better.

I'd appreciate any feedback.
Tim.

Very nicely done Tim! I’m assuming that your using PS or PI. I’m using Gimp. I don’t understand how you remove the left over artifacts evenly without showing the “clone or heal” marks. Even when you use the feathering and other settings in that tool it just not a natural look and to me thats like adding something that isn’t there. Maybe its just me.

Dale
Tim Hutchison avatar
Dale Penkala:
Tim Hutchison:
I used this technique on this imageof IC1795. I think it performed pretty well. I did use the "Expand Mask" function to expand the selection a few pixels after inverting the selection, and had a few (maybe 20 or so) areas that I had to clean up with the patch tool, but it was at least as good as Starnet and maybe a little bit better.

I'd appreciate any feedback.
Tim.

Very nicely done Tim! I’m assuming that your using PS or PI. I’m using Gimp. I don’t understand how you remove the left over artifacts evenly without showing the “clone or heal” marks. Even when you use the feathering and other settings in that tool it just not a natural look and to me thats like adding something that isn’t there. Maybe its just me.

Dale

*** Hi Dale:

I use PI for most of the process, but I use PS for some of the color balancing, etc.  I'm a big believer in using the best tool for the job.  I'm not religious about either application.  For every image I do, I use PI for some stuff and PS for others (more PI than PS).  

For this question, I use the clone stamp tool in PS with "Content Aware Fill" turned on.  I'll circle the area with the star artifact and drag to a nearby area to replace it.  The content aware fill keeps it from looking like a clone stamp, feathering and matching color and texture pretty nicely.  You're doing such a small area that you really don't have to worry about "adding something" to the image.  Plus, when you actually put the stars back in the end, you cover most of that back up anyway.  It's the "halo" that you're really trying to minimize, in my opinion.

Hope that helps.
Tim.
Helpful Respectful Concise Supportive
Dale Penkala avatar
Tim Hutchison:
Dale Penkala:
Tim Hutchison:
I used this technique on this imageof IC1795. I think it performed pretty well. I did use the "Expand Mask" function to expand the selection a few pixels after inverting the selection, and had a few (maybe 20 or so) areas that I had to clean up with the patch tool, but it was at least as good as Starnet and maybe a little bit better.

I'd appreciate any feedback.
Tim.

Very nicely done Tim! I’m assuming that your using PS or PI. I’m using Gimp. I don’t understand how you remove the left over artifacts evenly without showing the “clone or heal” marks. Even when you use the feathering and other settings in that tool it just not a natural look and to me thats like adding something that isn’t there. Maybe its just me.

Dale

*** Hi Dale:

I use PI for most of the process, but I use PS for some of the color balancing, etc.  I'm a big believer in using the best tool for the job.  I'm not religious about either application.  For every image I do, I use PI for some stuff and PS for others (more PI than PS).  

For this question, I use the clone stamp tool in PS with "Content Aware Fill" turned on.  I'll circle the area with the star artifact and drag to a nearby area to replace it.  The content aware fill keeps it from looking like a clone stamp, feathering and matching color and texture pretty nicely.  You're doing such a small area that you really don't have to worry about "adding something" to the image.  Plus, when you actually put the stars back in the end, you cover most of that back up anyway.  It's the "halo" that you're really trying to minimize, in my opinion.

Hope that helps.
Tim.

Thanks Tim for the info, I'll have to look at the way Gimp handles the "content aware fill" your talking about. I wasn't aware that there was an option for that. Maybe not in Gimp but I'd be surprised if it doesn't as PS and Gimp are very close.

Dale
Marcelof avatar
I was considering doing something similar in GIMP - using StarNet++ just to generate a mask for further procesing.  Glad someone else sees the value in this technique.

Since you're using Photoshop, you might want to take a look at Russell Croman's site and read about his new Photoshop plugin for star removal.  It looks absolutely great, and it might make the StarNet++ approach obsolete in a hurry.

https://www.rc-astro.com/resources/StarXTerminator/


+1

It works fantastic and also works in PS for Mac M1 (which Starnet does not do in PI).

Also in the case of Macs M1 it is ridiculously fast, it literally takes only 2 or 3 seconds.
rhedden avatar
For GIMP users who wish to remove ugly StarNet++ artefacts like star halos or checkered blotches, you can download the Resynthesizer (Heal Selection) plugin and have at it.  The Resynthesizer will obliterate any remaining artefacts in the starless image in a hurry, assuming you don't have hundreds or thousands of them to process out.  You can get some really clean starless images with a little patience and some repeated selection healing.

By using the resynthesizer, you are changing your starless image using something akin to AI without any regard for what was actually present in the original data.  In other words, if you see something in your image that you don't like, you just delete it and replace it with resynthesized pixels that look like they belong with the surrounding pixels.  Is it cheating?  Surely!  Of course, we're already talking about starless images generated by a neural network that leaves artefacts. By deleting a blemish created by StarNet++, you're just replacing altered pixels with more altered pixels that look better.  It's all artwork at this point; any science is long gone. 

Here is a discussion of the Resynthesizer plugin, but you're on you own to download it from a safe site and install it correctly in your version of GIMP.

link to GIMP forum
Well Written Helpful Insightful Engaging
rhedden avatar
Here's a little demo of the GIMP Resynthesizer obliterating a StarNet++ blemish

Original starless image sample with obvious StarNet++ artefact:



Same after 5 seconds of work with Resynthesizer plugin:

Helpful
Dale Penkala avatar
I was considering doing something similar in GIMP - using StarNet++ just to generate a mask for further procesing.  Glad someone else sees the value in this technique.

Since you're using Photoshop, you might want to take a look at Russell Croman's site and read about his new Photoshop plugin for star removal.  It looks absolutely great, and it might make the StarNet++ approach obsolete in a hurry.

https://www.rc-astro.com/resources/StarXTerminator/


+1

It works fantastic and also works in PS for Mac M1 (which Starnet does not do in PI).

Also in the case of Macs M1 it is ridiculously fast, it literally takes only 2 or 3 seconds.

Boy I sure wish there’s as a plugin for Gimp that did this. I know Gimp is an off shoot of PS but still would be nice if we had something like that.
Dale Penkala avatar
Here's a little demo of the GIMP Resynthesizer obliterating a StarNet++ blemish

Original starless image sample with obvious StarNet++ artefact:



Same after 5 seconds of work with Resynthesizer plugin:


Sorry I missed this before I posted my last comment! 🙄
This looks interesting! I’ll need to investigate this further! Thanks @rhedden 

Dale
arjan brussee avatar
this image


that is a great result and tip as well. I'll take a look. More software to explore
Tayson avatar
WOW!
Thanks.