Webreaper / Damselfly

Damselfly is a server-based Photograph Management app. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names. Damselfly includes support for object/face detection.
GNU General Public License v3.0
1.49k stars 76 forks source link

wrap opencv in a gRPC service? #466

Closed dhthwy closed 1 year ago

dhthwy commented 1 year ago

Would you be open to experimenting with opencv as a gRPC service via either c++ or python?

I would love to build Damselfly on my mac m1, as my linux/win box is slow in comparison. As you know, emugu's commercial licensing for OSX is a blocker.

I can do the implementation in either language if you'd like to see how that'd fly.

Webreaper commented 1 year ago

Not sure what you're getting at here. I already provide Mac binaries for Damselfly... The only thing I haven't done yet is provide a docker image for Mac. #295

dhthwy commented 1 year ago

If you aren't interested in contributions from mac users then this is a non-issue. I/others need to be able to build it on OSX to do that -- it's blocked by the commercial license for mac -- the nuget package for emgu fails. Unless I am missing something.

Webreaper commented 1 year ago

The nuget package is committed to the repo, and there's a nuget.config which points to it. So you should be able to check out and build on Mac without needing to do anything special.

https://github.com/Webreaper/Damselfly/tree/master/localPackages

dhthwy commented 1 year ago

I tried building the master branch the other day and got failures from the nuget package complaining about not being supported on mac due to commercial license. I'll try it again.

-- edit I misremembered the exact error message, it just fails with a 'can't find' error.

Webreaper commented 1 year ago

Perhaps you didn't pick up the nuget.config, or you tried to update to the latest emgucv package (which I don't have the binaries for, they only made a couple of versions available to me for free).

dhthwy commented 1 year ago

Damselfly/Damselfly.ML.EmguFace/Damselfly.ML.EmguFace.csproj : error NU1101: Unable to find package Emgu.CV.runtime.macos. No packages exist with this id in source(s): Nuget.org. PackageSourceMapping is enabled, the following source(s) were not considered: /usr/local/share/dotnet/library-packs, Local, SkiaSharp Betas. [/Volumes/main/Users/dah/projects/Damselfly/Damselfly.Web.Server/Damselfly.Web.Server.csproj]

That's the error message I get when running makeinstall.sh, which results in build error.

I see now. I didn't notice the localPackages folder.

NuGet.config:

<configuration>
  <packageSources>
    <clear />
    <add key="Nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="SkiaSharp Betas" value="https://aka.ms/skiasharp-eap/index.json" />
    <add key="Local" value="./localPackages" />
  </packageSources>

  <packageSourceMapping>
    <packageSource key="Nuget.org">
      <package pattern="*" />
    </packageSource>
    <packageSource key="SkiaSharp Betas">
      <package pattern="SkiaSharp.*" />
    </packageSource>
    <packageSource key="Local">
      <package pattern="EMGUCV*" />
    </packageSource>
  </packageSourceMapping>
</configuration>
Webreaper commented 1 year ago

makeinstall.sh may be out of date. If you're building locally it's probably easier to just open the sln in VS for Mac and just build. That's what I do!

dhthwy commented 1 year ago

makeinstall.sh did work in Linux, just fyi. Looks like same error in VS.

Ah well, I'll play with it and update with what I did to fix it.

[] Screen Shot 2023-01-05 at 12 29 27 AM (url)

dhthwy commented 1 year ago

Funny. emgu package showed as installed in VS. I uninstalled it. Tried build again, now it works. Weird.

Webreaper commented 1 year ago

This is why we enjoy programming.