Windows custom model call example

can someone please share their deepstack command (windows) to run a custom model.

The documentation say this:
deepstack --MODELSTORE-DETECTION “C:/path-to-custom-models-folder” --PORT 80

It always takes me way longer than it should to finally get it running, trying all sorts of calls, before I actually get it working. And it is always so simple after the fact (or maybe disappears as the response log populates), I neglect to write down the exact command that worked. Can someone just save me some time and share an example?


1 Like

Sure, this is my startup in powershell:

mode con: cols=130 lines=30
deepstack  --MODELSTORE-DETECTION "C:\temp\models\" --PORT 8181

The first line just sets the size of the window so each request fits on a single line and is optional.
I first got confused as i thought i should point to the model-file itself, and not just the folder.
The port could be anything you want, as long as it’s not already in use by another process.

I saved the above lines of code in a powershell script file (startdeepstack.ps1)
To run it automatically i use this startup line from a command-prompt or .bat-file, to make sure it opens in a separate PS-window, is run as the logged on user, and shows on the desktop and not just running in the background:

PowerShell -NoProfile -ExecutionPolicy Bypass -Command “& {Start-Process PowerShell -ArgumentList ‘-NoProfile -ExecutionPolicy Bypass -File "“C:\scripts\startdeepstack.ps1"”’ -Verb RunAs}”

A few issues i have/had:

  • Starting custom models from CMD and not PowerShell does not work. Deepstack starts as it should, but no models are loaded. Probably some issue with the parameter input. Just make sure you run it from PowerShell.

  • Runnig custom models with the parameter --MODE HIGH is for some reason not working at all for me. (Running Windows native 2021.02 GPU version). Everything starts fine, but no requests gets processed. If you have issues, just try the default.

1 Like

Perfect! Thanks so much!

I think I had remembered this wrong, and was purposely using CMD instead. oops!

1 Like