Comments (5)
Hi @QLinhHub ,
yes the send_event example shows how to declare your own custom event and sounds like an option for occasional detections.
I think that you would need to adapt the event declaration as well as the function sending the event to your data, probably updating Value
field in the .c-file. Then of course also add some functionality that reads the detection results in the C-code, preferably directly instead of indirectly(like reading a log file). There is a helper script to help you confirm that your event got declared, see axevent README.
Hopefully the axevent API documentation can be of some help in the adaptation.
Then it's a question to read the events from your server(laptop), could the ONVIF documentation chapter 9 be of any help to do this?
from acap-native-sdk-examples.
Hello @pataxis
Thanks a lot for your answer!
I tried the send_event example (I read the log file but of course I will change this approach in the future). In general, it works but there is the problem of the send time.
For the timer to declare event, the minimum value I can put here is 3 seconds. And for time for fetching event, it is 4 seconds. So it takes some time (about 7 seconds) for each event to be sent. Do you think this is because I am reading the detection results indirectly from the log file? And if I can do it directly, do you think the latency will be significantly improved?
Furthermore, the axevent library is designed to be used with the GLib library. An application using the axevent library must have a running GMainLoop (according to axevent.h), which makes integration with the object detection code (an infinite loop through the video frames) somewhat difficult.
I look forward to hearing your suggestions and ideas !
Thanks in advance!
Here are some detection results I got from the camera to my laptop (in a jupyter notebook):
from acap-native-sdk-examples.
Hi,
sounds great that it's up and running.
The API documentation says:
A note on callback functions
The callback functions registered with the AXEventHandler will be called from the GMainLoop thread in the default context. This means that the client may not prevent callback functions from returning, nor should any lengthy processing be made in the callback functions. Failure to comply with this convention will prevent the event system from, or delay it in, sending or delivering any more events to the calling application.
Reading a log file sounds like it could be "lengthy processing" and I would expect that at least the 4 seconds should be possible to reduce if you move this handling directly to the C-code. This might also affect the callback time, i.e. the minimum 3 seconds you can set, if the event system gets blocked.
Another option to axevent
could be to build a third party library like mosquitto which sends MQTT
events. This library has functions like mosquitto_loop that works similar to GMainLoop
in the send_event example application.
from acap-native-sdk-examples.
Hello @pataxis
Thank you very much for your response !
I managed to send an event from my camera to my laptop ! Thanks again !
Actually, I try to integrate yolov5s (tflite) into my camera and I get the error from larod: "setupLarod: Unable to load model: Could not allocate tensors".
I haven't found the solution yet. But I think maybe the yolov5s is too big for my camera (ARTPEC-7 chip, 1GB RAM) or maybe there are some layers in the yolov5s that larod does not support (larod custom layers).
Please let me know your ideas, it would be very helpful !
Thanks in advance !
from acap-native-sdk-examples.
Hi, great, then I will close this issue.
For the larod question it's better to open a new issue. It makes searching for Q/A easier for other developers.
from acap-native-sdk-examples.
Related Issues (20)
- sh[4012]: double free or corruption (out) HOT 2
- How do you set which view from the camera should be used for e.g. object detection? HOT 1
- object-detection-cv25 - Unable to run app with high resolution HOT 4
- object-detection example - quantization issue HOT 5
- WARNING: Fallback unsupported op 32 to TfLite HOT 5
- vdo-opencl-filering: Example broken HOT 2
- using-opencv: example broken on armv7hf HOT 1
- Invalid application manifest when adding dbus resource to manifest HOT 3
- AxEventValueSet getKeys
- metadata-broker example (ssh) HOT 1
- metadata broker feedback HOT 2
- Metadata Broker (aarch64) crash HOT 3
- Errors in logs with axoverlay example HOT 1
- cpu-proc padding HOT 1
- Deep learning Inference C++ example HOT 2
- vdo-larod + opencv HOT 11
- Model load error on CV25 HOT 2
- error while loading shared libraries: libmdb.so.0 HOT 9
- Error libm.so.6: version `GLIBC_2.38' & libstdc++.so.6: version `GLIBCXX_3.4.30' not found HOT 3
- Issues migrating an app using the Event API to periodically send heartbeats (from SDK3 to SDK4) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acap-native-sdk-examples.