asterics / AsTeRICS

The Assistive Technology Rapid Integration & Construction Set
http://www.asterics.eu
Other
56 stars 27 forks source link

downgraded javacv to 1.5, this uses opencv 4.0.1 without openblas dep… #338

Closed deinhofer closed 4 years ago

deinhofer commented 4 years ago

…endency.

How to test:

git fetch
git checkout javacv-upgrade-and-optimizations-1.5
ant clean
ant run-debug
ChrisVeigl commented 4 years ago

hi, works on Win10 Laptop, first-time-deployment is a lot faster indeed... (branch name needs prefix deinhofer: git checkout deinhofer/javacv-upgrade-and-optimizations-1.5)

deinhofer commented 4 years ago

hi, works on Win10 Laptop, first-time-deployment is a lot faster indeed... (branch name needs prefix deinhofer: git checkout deinhofer/javacv-upgrade-and-optimizations-1.5)

Thanks for testing! Should be even more fast now. Split up architecture bundles into x86_64 and x86 on Windows. When loading a service jar, the folowing file names are checked:

javacv-xxx-<os>-<architecture>-<bitness>.jar
javacv-xxx-<os>-<architecture>.jar
javacv-xxx-<os>.jar
deinhofer commented 4 years ago
benjaminaigner commented 4 years ago

:+1: , reduces loading time on my old PC from 5s to 1s:

     [java] Loading haarcascade classifier
     [java] XFaceTrackerMouse - AsTeRICS ARE #{APPLICATION_VERSION_NUMBER}# [:8081,:9090]
     [java] 2020-05-06 07:36:58.781 WARNING [DeploymentManager deployModel] While initializing runtime property values of plugin instance <XFacetrackerLK.1>: Ignoring propertyName <resizeHeight>, propertyValue <null>
     [java] 2020-05-06 07:36:58.806 INFO [AREServices deployFileInternal] Deployed Model XFaceTrackerMouse.acs !
     [java] 
     [java] 2020-05-06 07:36:58.824 INFO [SharedFrameGrabber init] Available grabber: [Default, OpenCV, FFmpeg, OpenKinect, RealSense, PS3Eye, DC1394, FlyCapture, FlyCapture2, IPCamera]
     [java] 2020-05-06 07:36:58.824 INFO [SharedFrameGrabber init] Default FrameGrabber: OpenCV
     [java] 2020-05-06 07:36:58.824 INFO [SharedFrameGrabber init] FrameGrabber: Default
     [java] 2020-05-06 07:36:58.824 INFO [SharedFrameGrabber init] DeviceKey: 0
     [java] 2020-05-06 07:36:58.824 INFO [SharedFrameGrabber init] Resolution: 320x240
     [java] 2020-05-06 07:36:58.825 INFO [SharedFrameGrabber init] grabberFormat: 
     [java] 2020-05-06 07:36:58.825 INFO [SharedFrameGrabber init] Using FrameGrabber: OpenCV
     [java] 2020-05-06 07:36:58.830 INFO [SharedFrameGrabber init] Setting deviceNr <0>
     [java] scaled face width: 136.0, orig.width: 68
bmedicke commented 4 years ago

This PR works just as well with macOS.

klues commented 4 years ago

Tested on Win10, T470, Core-i7 First loading time of XCameraMouse: 2,2s (before with newer dependencies: 5s) Instant face detection >100cm, before I needed to go closer to about 70cm

Made resizeHeight configurable, but this does not seem to have an impact --> probably remove property again

What is/was the intention of this property?

Actually only faces closer to the camera will very likely be faces for camera mouse usage.

Maybe it would be possible to limit the number of detected faces to 1 (if a face is already detected, do not detect another face). And if no face is detected the algorithm could start with a bigger minimum face size and decrease this property slowly, if no face is found. An easier solution maybe would be to just add a property "minFaceSize" which can be configured for a specific use case.

sabicalija commented 4 years ago

If tested again, as well: HW: Lenovo Thinkpad P50 (Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz, 32GiB DDR4)

Microsoft Windows: 10.0.18363.778
Java: 1.8.0_181-b13

ARE Startup: 20 sec.  (before: 3~5 sec.)
XCameraMouse (First) Startup: <3 sec.  (before: 3~5 sec.)
Ubuntu Desktop: 19.04 (disco)
Java: 1.8.0_232

ARE Startup: 8~9 sec.  (before: ~8 sec.)
XCameraMouse (First) Startup: 1~2 sec.  (before: <3 sec.)
XCameraMouse Distance: ~110cm  (before: 70cm)

I've started the ARE (on Windows) from terminal this time because there was no installer for this branch.

deinhofer commented 4 years ago

Ok, I will remove the resizeHeight property again and merge. I will build the final installer tonight so that we can publish them tomorrow.