| | |
| | | |
| | | import ( |
| | | "analysis/demo" |
| | | srv "analysis/work/service" |
| | | "flag" |
| | | "fmt" |
| | | ) |
| | |
| | | var ( |
| | | streamURL string |
| | | picFolder string |
| | | |
| | | asServer bool |
| | | ) |
| | | |
| | | func init() { |
| | |
| | | |
| | | flag.StringVar(&ipcURL, "ipc", "ipc:///tmp/pic.ipc", "ipc label") |
| | | flag.StringVar(&proc, "proc", "", "proc name") |
| | | |
| | | flag.BoolVar(&asServer, "server", false, "run ipc as server") |
| | | } |
| | | |
| | | const ( |
| | |
| | | |
| | | fmt.Println("start test, pic folder: ", picFolder) |
| | | |
| | | // demo.Face(picFolder) |
| | | // demo.Yolo(streamURL) |
| | | // demo.CVDraw() |
| | | imageChan := make(chan srv.ImageInfo) |
| | | d := srv.NewReciever(ipcURL, imageChan) |
| | | |
| | | demo.RunYoloFromIPC(ipcURL, false) |
| | | if asServer { |
| | | go d.RunAsServer() |
| | | } else { |
| | | go d.RunAsClient() |
| | | } |
| | | |
| | | demo.ShowYolo(imageChan) |
| | | |
| | | fakeStartProc() |
| | | } |