Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

StarNet v2

Astrophotography Imaging Software
  • Please log in to reply
429 replies to this topic

#26 Robowarrior834

Robowarrior834

    Lift Off

  • -----
  • Posts: 4
  • Joined: 06 Aug 2020

Posted 28 January 2022 - 08:29 AM

Hi Nekitmm,

 

Is it still possible to run the program from command line? I find that its quicker to save a file in a pre determined name then to open an interact with a gui.

 

sincerely,

Jamie Elovski


Edited by Robowarrior834, 28 January 2022 - 08:52 AM.

  • nekitmm and karolbe like this

#27 mrszymon

mrszymon

    Lift Off

  • -----
  • Posts: 23
  • Joined: 09 Aug 2014

Posted 28 January 2022 - 11:15 AM

For those that are trying to install StarNet2 on a modern Mac -- you'll likely run into a problem when PI tries to add it as a module, since it's untrusted code downloaded off the internet.  To fix this, you can run the following commands:

sudo xattr -dr com.apple.quarantine /Applications/PixInsight/bin/StarNet2-pxm.dylib
sudo chmod 755 /Applications/PixInsight/bin/StarNet2-pxm.dylib

Then try and search for the module again and it should allow it.

 

-simon


  • pfile, ezwheels, deepanshu29 and 2 others like this

#28 Jhillphotos

Jhillphotos

    Sputnik

  • -----
  • Posts: 47
  • Joined: 12 Jun 2019
  • Loc: Birmingham, AL

Posted 28 January 2022 - 11:44 AM

Hi Nikita! 

 

Thank you for this wonderful creation. Your time and efforts are greatly appreciated by so many of us in the astro community. I'm having some trouble installing the module, would you give me some guidance?

 

I've done all the troubleshooting steps in the text document and I still can't get the module to show up after hitting "search." I have a 2018 Macbook Pro with i5 processors (that I'm pretty certain support AVX) and all the files are copied into the PixInsight "bin" folder like you instructed. I've tried re-downloading and re-copying the files multiple times and there has been no change. 

 

What do you suggest I do?

 


  • nekitmm likes this

#29 nekitmm

nekitmm

    Vendor - StarNet Software

  • *****
  • Vendors
  • topic starter
  • Posts: 232
  • Joined: 25 Apr 2018

Posted 28 January 2022 - 11:56 AM

Hi Nikita! 

 

Thank you for this wonderful creation. Your time and efforts are greatly appreciated by so many of us in the astro community. I'm having some trouble installing the module, would you give me some guidance?

 

I've done all the troubleshooting steps in the text document and I still can't get the module to show up after hitting "search." I have a 2018 Macbook Pro with i5 processors (that I'm pretty certain support AVX) and all the files are copied into the PixInsight "bin" folder like you instructed. I've tried re-downloading and re-copying the files multiple times and there has been no change. 

 

What do you suggest I do?

Thanks a lot for kind words! I think the trick from the previous post should solve your problem:

 

For those that are trying to install StarNet2 on a modern Mac -- you'll likely run into a problem when PI tries to add it as a module, since it's untrusted code downloaded off the internet.  To fix this, you can run the following commands:

sudo xattr -dr com.apple.quarantine /Applications/PixInsight/bin/StarNet2-pxm.dylib
sudo chmod 755 /Applications/PixInsight/bin/StarNet2-pxm.dylib

Then try and search for the module again and it should allow it.

 

-simon

Let me know if this helps!



#30 nekitmm

nekitmm

    Vendor - StarNet Software

  • *****
  • Vendors
  • topic starter
  • Posts: 232
  • Joined: 25 Apr 2018

Posted 28 January 2022 - 11:56 AM

For those that are trying to install StarNet2 on a modern Mac -- you'll likely run into a problem when PI tries to add it as a module, since it's untrusted code downloaded off the internet.  To fix this, you can run the following commands:

sudo xattr -dr com.apple.quarantine /Applications/PixInsight/bin/StarNet2-pxm.dylib
sudo chmod 755 /Applications/PixInsight/bin/StarNet2-pxm.dylib

Then try and search for the module again and it should allow it.

 

-simon

Thanks, this is really helpful, I will include it into instructions for the Mac version!


  • mrszymon likes this

#31 nekitmm

nekitmm

    Vendor - StarNet Software

  • *****
  • Vendors
  • topic starter
  • Posts: 232
  • Joined: 25 Apr 2018

Posted 28 January 2022 - 11:57 AM

Hi Nekitmm,

 

Is it still possible to run the program from command line? I find that its quicker to save a file in a pre determined name then to open an interact with a gui.

 

sincerely,

Jamie Elovski

Yeah, I think it should not be too hard to compile the command line tool version, I will get to it when I got time!



#32 nekitmm

nekitmm

    Vendor - StarNet Software

  • *****
  • Vendors
  • topic starter
  • Posts: 232
  • Joined: 25 Apr 2018

Posted 28 January 2022 - 11:58 AM

Nikita, I don't see a linux build for version 2. Is that coming soon?

There will be no GUI for linux, but I will work towards PI and command line versions!



#33 nekitmm

nekitmm

    Vendor - StarNet Software

  • *****
  • Vendors
  • topic starter
  • Posts: 232
  • Joined: 25 Apr 2018

Posted 28 January 2022 - 11:59 AM

Hello Nikita 
Thanks for the long awaited release of this! the difference is huge!

Nice to see this! Still not perfect though for your image looks like. Do you have big halos around stars?



#34 grimlock408

grimlock408

    Lift Off

  • -----
  • Posts: 10
  • Joined: 14 Apr 2017
  • Loc: Croatia

Posted 28 January 2022 - 12:00 PM

I would like to thank Nikita for allowing me to beta test v2.   My primary usage of StarNet is to remove the stars at a linear stage to get a deeper stretch without bloating the stars and then add the stars back after the stretch using an Adam Block method.   One of my first uses of StarNet v2 was on my Vela SNR IOTD image:  https://www.astrobin.com/p8eb76/0/

 

Thanks a bunch Nikita for all of the effort you put into this and making it freely available.  

 

For those wanting to improve performance, StarNet can be GPU enabled with some additional steps.  

https://www.cloudyni...nabled-starnet/

To what Adam Block method you are referring to if you don't mind me asking? I have never tried that method so I'm curious to see how it works.

 

Starnet v1 was an amazing gift to the astronomy and to have this better v2 version for free I'm really out of words. Thank you nekitmm for all the hard work I can't even imagine how many hours this took. Amazing. You deserve clear skies forever. bow.gif


Edited by grimlock408, 28 January 2022 - 12:03 PM.

  • newbie SA likes this

#35 Jhillphotos

Jhillphotos

    Sputnik

  • -----
  • Posts: 47
  • Joined: 12 Jun 2019
  • Loc: Birmingham, AL

Posted 28 January 2022 - 12:01 PM

Thanks a lot for kind words! I think the trick from the previous post should solve your problem:

 

Let me know if this helps!

That did the trick! At the time of writing my post, I hadn't checked the second page of replies yet :p Thanks for your help!


  • nekitmm likes this

#36 ac4lt

ac4lt

    Viking 1

  • *****
  • Posts: 669
  • Joined: 16 Aug 2017
  • Loc: Shenandoah Valley

Posted 28 January 2022 - 12:59 PM

Just installed and the first impression is that the results are incredible! This may force me to go back and reprocess a bunch of old data.

 

The instructions say to put everything in PI's bin directory but the weights file needs to go in PI's lib directory.

 

And regarding installation, any chance that a PI repository could be created for this? It would simplify installation and make it easy for people to stay up to date.


  • elinchrom and GGR_Scott like this

#37 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 6,598
  • Joined: 14 Jun 2009

Posted 28 January 2022 - 01:49 PM

has anyone tried to get this going on an M1 mac? i expected that SN2 would just be able to pick up and use the libtensorflow* libraries that StarNet1 uses (the ones without AVX2/FMA instructions that we've been using on M1 macs) but SN2 would not load. i forced the module name into the PI preferences list which revealed that the StarNet2 module was looking for libtensorflow* in the Frameworks folder rather than the pixinsight lib/ or bin/ folders. after copying those old tensorflow libraries into the Frameworks/ directory, i had a crash that i've never seen before. i don't know if this is because rosetta is translating the same code twice or something but it was very cryptic. it looked like a crash within tensorflow itself.

 

so then i thought i'd see what happened if i just used the libraries that shipped with StarNet2. i put those into the Frameworks/ directory. to my surprise after a very long pause (which must be rosetta crunching on the dylibs), SN2 was successfully found. however, when i try to run it, i get "unknown exception" on the PI console.

 

i guess for completeness i need to remove all traces of starnet1 and its libraries and try again. it seems very strange that the dynamic loader is not looking in the pixinsight bin/ directory for the libraries in the first place... or maybe the version of the tensorflow API is different between the old starnet and the new starnet?

 

anyone else tried this?



#38 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 6,598
  • Joined: 14 Jun 2009

Posted 28 January 2022 - 02:08 PM

ok well i can see that this must have something to do with the tensorflow API version expected by starnet v1 vs. starnet v2. if i remove all the SN V1 tensorflow libs then SN V2 loads and runs fine. if i try to load starnet V1 with the sn v2 libs loaded then it crashes in a similar manner as V2 did with the V1 libs hanging around.

 

but since the libraries that shipped with StarNetv2 work on an M1 mac, this must imply that they were compiled without AVX2/FMA instruction support. for M1 users this is a good thing, but for everyone else on newer intel processors, SNV2 will run more slowly than SNV1.

 

nikita - did you compile tensorflow w/o vector instructions on purpose?



#39 asanmax

asanmax

    Vendor - DSLR Modifications

  • *****
  • Vendors
  • Posts: 2,498
  • Joined: 17 Sep 2018
  • Loc: Vancouver BC

Posted 28 January 2022 - 05:52 PM

Thank you so much! I now clearly see myself reprocessing some of my images in the near future!


  • nekitmm likes this

#40 JeffreyHorne

JeffreyHorne

    Vostok 1

  • -----
  • Posts: 117
  • Joined: 22 Apr 2013

Posted 28 January 2022 - 06:45 PM

Thanks for this gift, @nekitmm! 


  • PhotonHunter1 and nekitmm like this

#41 _MiR_

_MiR_

    Lift Off

  • -----
  • Posts: 8
  • Joined: 28 Jan 2022

Posted 28 January 2022 - 07:00 PM

@pfile, do you mind getting a little more into detail which steps made Starnet++ work on your M1?

 

I removed old tensorflow libs but This step alone did not help, where did you manually register starnet?

Thank you,

 

Michael



#42 dghent

dghent

    N.I.N.A. (& More)

  • *****
  • Freeware Developers
  • Posts: 2,188
  • Joined: 10 Jun 2007
  • Loc: Maryland, US

Posted 28 January 2022 - 07:13 PM

 

Long story short - this release comes with updated license terms that specifically limits StarNet usage to astrophotography processing only. In no form shall StarNet or any of its components and outputs be used to create any derivative works, including but not limited to, training of any kind of neural networks for any king of image processing purposes. This includes not only star removal, but any other kinds of image transformations. StarNet shall not be used to aid development of other software. This limitation includes some non-trivially harmful actions like sharing (PMing) original images on which StarNet works well (and other software does not) with interested parties. Overall, just remember that if something is given to you for free doesn't mean it has no value and you can do whatever you want with it.

 

The open source part of the story is also over, so the code on github will also not be updated, unfortunately. I will also not reply to any inquiries about the details of StarNet's development/training etc. due to reasons I won't disclose now. Any information about StarNet's NN, training/test datasets etc. is now proprietary.

In no form shall StarNet or any of its components and outputs be used to create any derivative works... - A StarNet output would be a star mask, and it would be used in creating a derivative work. Therefore using StarNet output as a mask is now prohibited because it creates are derivative work? The resulting image cannot be processed, such as plate solved?

 

This includes not only star removal, but any other kinds of image transformations - So no image annotation or further editing such as sharpening, color correction, etc? An image processed by StarNet must absolutely be the final stop on any processing pipeline?

 

StarNet shall not be used to aid development of other software.  - So this effectively prevents the development of PixInsight scripts such as EZ Suite or other scripts or programs that incorporate StarNet as part of their overall workflow. Is this truly your intent?

 

This limitation includes some non-trivially harmful actions like sharing (PMing) original images on which StarNet works well (and other software does not) with interested parties. - My mouth has not only hit the floor; it has gone straight through it. Now you're banning people from even learning the software by comparison and example - two extraordinarily common modes of learning. How on *earth* is this even considered harmful? Really.

 

Overall, just remember that if something is given to you for free doesn't mean it has no value and you can do whatever you want with it. - As a FOSS advocate, I respect your choice to keep the source closed but I cannot agree that the stipulations you put on the output of StarNet protect anything or serve any meaningful purpose. It really sounds like the better course would have been to commercialize this as a product. Then people can pay for the privilege of doing whatever they wish with the program's output. Instead, you've chosen the worst of both worlds - closed source and highly restrictive stipulations on how the software and its output are used.

 

I hope you either reconsider or clarify these points. Astrophotography is an immense ecosystem of cooperating tools that complement and enhance each other. There are far better ways to be recognized for your hard work and maintain the integrity of it. After all, all of us in the Free/Open Source Software (FOSS) community put our own blood, sweat, and tears into our respective creations, as you have with StarNet. But we don't resort to such crazy stipulations to "protect" our efforts. Such actions do not benefit the community and, in the long run, will be of no benefit the issuer.


  • polslinux likes this

#43 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 6,598
  • Joined: 14 Jun 2009

Posted 28 January 2022 - 07:43 PM

@pfile, do you mind getting a little more into detail which steps made Starnet++ work on your M1?

 

I removed old tensorflow libs but This step alone did not help, where did you manually register starnet?

Thank you,

 

Michael

you shouldn't have to manually register starnet - but it can help with debugging. PI tries to start a module when you try to scan for new modules, and if the module fails to start for any reason it just silently fails - it doesn't show you the module in the list of found modules and doesn't give any info about what happened. but you can edit the pixinsight preferences file to manually add the module you want to install, and if it fails to load at least you get a dialog box saying what happened. of course you need to quit PI before editing this file and then be prepared for PI to crash when starting - if that happens just delete the lines you added to the preferences file and start up again.

 

anyway i think i ended up with the two starnet libs that nikita packaged with SN2 in /Applications/PixInsight/PixInsight.app/Contents/Frameworks/ but that might not have been necessary. i had put them there because PI seemed to be looking for the libraries there when the old ones were still in /Applications/PixInsight/bin/ .

 

once i had removed the old libraries, then Modules > Install Modules, then clicking "Search" found the module. there was a very long delay which i think is the operating system doing the rosetta2 translation of the new libraries to ARM. after that delay the module showed up in the dialog box and i just clicked Install.

 

rob



#44 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 6,598
  • Joined: 14 Jun 2009

Posted 28 January 2022 - 07:47 PM


I hope you either reconsider or clarify these points. Astrophotography is an immense ecosystem of cooperating tools that complement and enhance each other. There are far better ways to be recognized for your hard work and maintain the integrity of it. After all, all of us in the Free/Open Source Software (FOSS) community put our own blood, sweat, and tears into our respective creations, as you have with StarNet. But we don't resort to such crazy stipulations to "protect" our efforts. Such actions do not benefit the community and, in the long run, will be of no benefit the issuer.

i read all of his points to mean that you can't do any of those things in support of someone trying to develop another neural-net based star removal program. of course the reason we have lawyers is that human languages can be ambiguous, so this is not a problem unique to SN2's T&C. hopefully nikita can clarify.

 

rob


  • nekitmm likes this

#45 nekitmm

nekitmm

    Vendor - StarNet Software

  • *****
  • Vendors
  • topic starter
  • Posts: 232
  • Joined: 25 Apr 2018

Posted 28 January 2022 - 08:19 PM

ok well i can see that this must have something to do with the tensorflow API version expected by starnet v1 vs. starnet v2. if i remove all the SN V1 tensorflow libs then SN V2 loads and runs fine. if i try to load starnet V1 with the sn v2 libs loaded then it crashes in a similar manner as V2 did with the V1 libs hanging around.

 

but since the libraries that shipped with StarNetv2 work on an M1 mac, this must imply that they were compiled without AVX2/FMA instruction support. for M1 users this is a good thing, but for everyone else on newer intel processors, SNV2 will run more slowly than SNV1.

 

nikita - did you compile tensorflow w/o vector instructions on purpose?

Rob,

 

I honesty didn't specify any custom compilation flags when compiling TF... I guess if it does work no your M1 Mac, then it is the default...

 

The newer StarNet version does use newer TF API, so you have to use new TF library to run it. However, it should be backwards-compatible. Weird that on my Mac both versions of StarNet work with the libraries provided with newer StarNet! I wonder why that's not your case...



#46 pfile

pfile

    Fly Me to the Moon

  • -----
  • Posts: 6,598
  • Joined: 14 Jun 2009

Posted 28 January 2022 - 08:43 PM

Rob,

 

I honesty didn't specify any custom compilation flags when compiling TF... I guess if it does work no your M1 Mac, then it is the default...

 

The newer StarNet version does use newer TF API, so you have to use new TF library to run it. However, it should be backwards-compatible. Weird that on my Mac both versions of StarNet work with the libraries provided with newer StarNet! I wonder why that's not your case...

ok - it could be the defaults are really conservative and the compiler won't emit the vector instructions under the defaults. actually this is exactly the same as the libraries in your starnetv1 package, and those libraries are what allowed us to get the PI module going on the M1 in the first place. the libraries that juan distributed have the vector instructions turned on which works well for almost everyone, except some people with older Xeon CPUs and of course the M1. we did talk about this before starnet was rolled into PI but juan didn't want to carry around multiple versions of the TF libraries or do all the machdep checks to figure out which one to use. i think he just declared that PI is only supported on newer CPUs.

 

i don't know if you want to do multiple builds of the tensorflow libraries but things would speed up a little for most people if you made a version with AVX2 and FMA turned on.

 

on the API front, this could boil down to a rosetta2 thing - both dylibs probably export a bunch of functions with the same name and so perhaps when you have multiple definitions rosetta is randomly throwing stuff away from one library or the other. the crashes were definitely inside of tensorflow and they seemed pretty obscure. at any rate i think it is OK for M1 users to discard Starnet V1 and just use V2, so this shouldn't be a big problem.

 

rob



#47 andreya108

andreya108

    Lift Off

  • -----
  • Posts: 4
  • Joined: 25 Apr 2021

Posted 28 January 2022 - 09:21 PM

There will be no GUI for linux, but I will work towards PI and command line versions!


Looking forward! Please tell me if you need any assistance regarding linux development which can help make the linux version sooner.
  • nekitmm likes this

#48 ajbulich

ajbulich

    Lift Off

  • -----
  • Posts: 1
  • Joined: 11 Jan 2022

Posted 28 January 2022 - 10:18 PM

Is there any way to use this on Mac without having PI? Can I use it as a standalone product rather than a PI module, since I don't have PI.

Thanks



#49 Ambress

Ambress

    Lift Off

  • -----
  • Posts: 18
  • Joined: 14 Apr 2021

Posted 28 January 2022 - 10:54 PM

Very nice to see this new release of Starnet version 2, Nikita, thank you!  I was happy to find that to continue successfully using the CUDA-boosted performance of Starnet++, all I had to do was copy the tensorflow.dll file that I used in Starnet++ over to the StarnetGUI_Win folder.

As others, I too would like to see a command-line version of Starnet version 2 as you provided in the original Starnet.  In contrast to the simple GUI you created, I favor the approach I took for Starnet++  for which I created a batch script to invoke Starnet++ from the Windows Context Menu "Send To" command.  That allowed me to very conveniently right-click on the file I wanted to process, select Send To Starnet++, and receive prompting for the stride size, with the output file then automatically renamed and written back to the same folder as the original file.  I did attempt that with starnetGUI.exe file, but quickly saw it ignored the arguments provided by the script and just ran in the usual manner.

Here's my own comparison image...nice results!  https://tinyurl.com/dp-Starnet1vs2
Thanks!

Daryl 


Edited by Ambress, 28 January 2022 - 11:46 PM.

  • nekitmm likes this

#50 nekitmm

nekitmm

    Vendor - StarNet Software

  • *****
  • Vendors
  • topic starter
  • Posts: 232
  • Joined: 25 Apr 2018

Posted 29 January 2022 - 01:13 AM

In no form shall StarNet or any of its components and outputs be used to create any derivative works... - A StarNet output would be a star mask, and it would be used in creating a derivative work. Therefore using StarNet output as a mask is now prohibited because it creates are derivative work? The resulting image cannot be processed, such as plate solved?

Yeah, I guess I need to add 'software' to this phrase to have 'any derivative software'. But overall you just pulled this phrase out of the context and opened it up to your free interpretations, which clearly contradict what is stated above: updated license terms that specifically limit StarNet usage to astrophotography processing only. So the output can obviously be processed. I am not sure why I have to write this.

 

This includes not only star removal, but any other kinds of image transformations - So no image annotation or further editing such as sharpening, color correction, etc? An image processed by StarNet must absolutely be the final stop on any processing pipeline?

Again, pulled out of context, just read the previous sentence.

 

StarNet shall not be used to aid development of other software.  - So this effectively prevents the development of PixInsight scripts such as EZ Suite or other scripts or programs that incorporate StarNet as part of their overall workflow. Is this truly your intent?

Clearly states that StarNet shall not be used to aid development of other software. I don't see how StarNet is used to develop EZ Suite. EZ Suite merely uses StarNet the same way any end user can. In other words, it just incorporates StarNet into it's workflow. That's totally fine.

 

This limitation includes some non-trivially harmful actions like sharing (PMing) original images on which StarNet works well (and other software does not) with interested parties. - My mouth has not only hit the floor; it has gone straight through it. Now you're banning people from even learning the software by comparison and example - two extraordinarily common modes of learning. How on *earth* is this even considered harmful? Really.

I explained a bit how neural networks-based software is different from traditional software in my post. This includes the explanation of how this can be harmful. I agree that this is one of more 'easy to misinterpret' pieces, but again this phrase should be considered in the context of aiding the development of derivative software.

 

Overall, just remember that if something is given to you for free doesn't mean it has no value and you can do whatever you want with it. - As a FOSS advocate, I respect your choice to keep the source closed but I cannot agree that the stipulations you put on the output of StarNet protect anything or serve any meaningful purpose. It really sounds like the better course would have been to commercialize this as a product. Then people can pay for the privilege of doing whatever they wish with the program's output. Instead, you've chosen the worst of both worlds - closed source and highly restrictive stipulations on how the software and its output are used.

This license most certainly does not prevent anyone from using StarNet for any meaningful purpose. Furthermore, even if you pay for the product it does not necessarily give you the privilege to do whatever you wish with the program's output, lol. Again, I explained why I am imposing some limitations on the usage in my post. I can not sell it or even receive donations for it at the moment.

 

 

I hope you either reconsider or clarify these points. Astrophotography is an immense ecosystem of cooperating tools that complement and enhance each other. There are far better ways to be recognized for your hard work and maintain the integrity of it. After all, all of us in the Free/Open Source Software (FOSS) community put our own blood, sweat, and tears into our respective creations, as you have with StarNet. But we don't resort to such crazy stipulations to "protect" our efforts. Such actions do not benefit the community and, in the long run, will be of no benefit the issuer.

Well, sorry, but things are just a bit more complicated in the case of neural networks, that's not my fault.

 

 

I am always available to clarify the license terms if needed, but I am not going to play the game of 'pull a phrase out of the context and come up with crazy interpretations'. I think the overall message is pretty clear and the license is not restrictive at all if your intent is to create astro images.


Edited by nekitmm, 29 January 2022 - 01:35 AM.

  • johnpane, ctnich, CptNautilus and 2 others like this


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics





Also tagged with one or more of these keywords: Astrophotography, Imaging, Software



Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics