More fun with U^2-Net (background removal): web app version with opyrator #59
                  
                    
                      helena-intel
                    
                  
                
                  started this conversation in
                Show and tell
              
            Replies: 3 comments 3 replies
-
| Omg Meme generator!! Make some examples, and put that on reddit? | 
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            -
| I added an optional caption to meme-ify it. Making the caption look pretty is left as an excercise for the reader :-) | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            -
| wow cool! | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Make a standalone web app (works on mobile too) for the background removal model with Opyrator!
Steps:
u2net_modelin the last line in the Settings cell to a different model configuration. For example, changeu2net_model = u2net_litetou2net_model = u2net_human_segto generate IR models for Human Segmentation. Make sure to run the entire notebook with these settings (choose: Kernel->Restart Kernal and Run All Cells). If all models have been created, the saved_models directory (in the 205-vision-background-removal directory) will contain three subdirectories/folders.pip install opyrator. Make sure to do this after activatingopenvino_env.opyrator launch-ui segmentation_app:remove_background -p 7777(execute this command in a terminal in the 205-vision-background-removal directory).It looks like this in a desktop web browser:

If you have good or fun results that you would like to share, please do!
Opyrator can do more than turning a function into a web app. See their documentation for more details: https://github.com/ml-tooling/opyrator
Disclaimer: this is meant as a fun thing to try. The app script does not contain any input checking and doesn't catch any exceptions. Do not use this as-is in production or on a public webserver.
Beta Was this translation helpful? Give feedback.
All reactions