Was wondering anyone had an code so that photoshop ran in the background or as a process that I could not see the GUI?
Not possible. On the Mac, you can minimize PS which almost does what you want. On Windows, you still get the images popping open and closed, which is definitely not what you want.
You may want to look at other tools if you truly need to do image processing without a UI.