Closed minideezel closed 4 years ago
I think that's a bug in the documentation. I checked the code and xMaximum
and yMaximum
should be the x,y coordinate of the bottom right corner, not the width and height of the mask rectangle. Try setting xMaximum
to 479
and yMaximum
to 165
.
That seemed to do it! That makes more sense! Thanks!
Two quick questions: do I have to do a docker-compose down and docker-compose up -d after I change the json file or is there a cleaner way to reload?
I have enableAnnotations: true
in my settings.json, but I don't see how to view them, if i browse to dockerurl:4242 it says:
Cannot GET /
How do I view the annotated images?
I'll update the documentation. Oops!
Two quick questions: do I have to do a docker-compose down and docker-compose up -d after I change the json file or is there a cleaner way to reload?
You don't have to do anything. The system will detect the files changed and auto-reload them. You should see Docker log messages that show this happening.
You need to directly reference the image you want at that address, looks like this isn't documented on the REST API wiki page. I'll update it as well. http://dockerurl:4242/annotations/_originalimagefilename.jpg_.
Where did you find the original table that described xMaximum and yMaximum? I checked the wiki just now and the documentation for it is correct.
I copied that table and modified it to what I interpreted your table as. I wasn't clear what the documentation meant.
Can I suggest as follows for changing right/bottom to left/top?
Property | Description | Example |
---|---|---|
xMinimum | Required. The left position of the top left corner of the mask. | 20 |
yMinimum | Required. The top position of the top left corner of the mask. | 30 |
xMaximum | Required. The left position of the bottom right corner of the mask. | 100 |
yMaximum | Required. The top position of the bottom right corner of the mask. | 200 |
Thanks again for the help, I haven't ever seen any update item in the logs when I save the settings file however.
Good suggestion, I'll update it.
Post your complete logs from Docker that show initial startup of the system and then what shows after you save either settings.json or triggers.json.
I omitted the lines about images being skipped, but here's the log:
trigger_1 | 2020-07-16T12:49:48-05:00 [Main] **** trigger_1 | 2020-07-16T12:49:48-05:00 [Main] Starting up version 5.1.1 trigger_1 | 2020-07-16T12:49:48-05:00 [Main] Timezone offset is 300 trigger_1 | 2020-07-16T12:49:48-05:00 [Main] Current time is Thu Jul 16 2020 12:49:48 GMT-0500 (Central Daylight Time) trigger_1 | 2020-07-16T12:49:48-05:00 [Settings] Loaded settings from /run/secrets/settings trigger_1 | 2020-07-16T12:49:48-05:00 [MQTT] Connected to MQTT server mqtt://10.0.0.88:1883 trigger_1 | 2020-07-16T12:49:48-05:00 [Local storage] Creating local storage folders in /node-deepstackai-trigger. trigger_1 | 2020-07-16T12:49:48-05:00 [Local storage] Enabling background purge every 60 minutes for files older than 30 minutes. trigger_1 | 2020-07-16T12:49:48-05:00 [Local storage] Running purge trigger_1 | 2020-07-16T12:49:48-05:00 [Main] Annotated image generation enabled. trigger_1 | 2020-07-16T12:49:48-05:00 [Main] Web server enabled. trigger_1 | 2020-07-16T12:49:48-05:00 [Triggers] Loaded configuration from /run/secrets/triggers trigger_1 | 2020-07-16T12:49:48-05:00 [Triggers] Loaded configuration for Front Driveway not cars trigger_1 | 2020-07-16T12:49:48-05:00 [Triggers] Loaded configuration for Front Driveway cars trigger_1 | 2020-07-16T12:49:48-05:00 [Triggers] Loaded configuration for North Road trigger_1 | 2020-07-16T12:49:48-05:00 [Trigger manager] There are 777 images waiting in /aiinput for Front Driveway not cars. trigger_1 | 2020-07-16T12:49:48-05:00 [Trigger manager] There are 777 images waiting in /aiinput for Front Driveway cars. trigger_1 | 2020-07-16T12:49:48-05:00 [Trigger manager] There are 777 images waiting in /aiinput for North Road. trigger_1 | 2020-07-16T12:49:48-05:00 [Pushbullet] Pushbullet is disabled via settings. trigger_1 | 2020-07-16T12:49:48-05:00 [Pushover] Pushover is disabled via settings. trigger_1 | 2020-07-16T12:49:48-05:00 [Telegram] Telegram is disabled via settings. trigger_1 | 2020-07-16T12:49:48-05:00 [Mqtt router] Subscribing to node-deepstackai-trigger/statistics/reset. trigger_1 | 2020-07-16T12:49:48-05:00 [Web server] Listening at http://localhost:4242 trigger_1 | 2020-07-16T12:49:48-05:00 [Local storage] Purge complete trigger_1 | 2020-07-16T12:49:48-05:00 [Mqtt router] Subscribing to node-deepstackai-trigger/statistics/trigger/reset. trigger_1 | 2020-07-16T12:49:48-05:00 [Mqtt router] Subscribing to node-deepstackai-trigger/motion. trigger_1 | 2020-07-16T12:49:48-05:00 [Trigger Front Driveway not cars] Listening for new images in /aiinput/drivewaysd.jpg trigger_1 | 2020-07-16T12:49:48-05:00 [Trigger Front Driveway cars] Listening for new images in /aiinput/drivewaysd.jpg trigger_1 | 2020-07-16T12:49:48-05:00 [Trigger North Road] Listening for new images in /aiinput/northroadSD*.jpg trigger_1 | 2020-07-16T12:49:48-05:00 [Main] Watching for changes to /run/secrets/settings trigger_1 | 2020-07-16T12:49:48-05:00 [Main] Watching for changes to /run/secrets/triggers trigger_1 | 2020-07-16T12:49:48-05:00 [Main] **** trigger_1 | 2020-07-16T12:49:48-05:00 [Main] Up and running! trigger_1 | 2020-07-16T12:49:49-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_065141376.jpg: Skipping as it was created before the service started. deepstack-ai_1 | [GIN] 2020/07/16 - 17:50:01 | 200 | 1.17227931s | 172.31.0.3 | POST /v1/vision/detection deepstack-ai_1 | [GIN] 2020/07/16 - 17:50:01 | 200 | 1.173287327s | 172.31.0.3 | POST /v1/vision/detection deepstack-ai_1 | [GIN] 2020/07/16 - 17:50:01 | 200 | 115.324531ms | 172.31.0.3 | POST /v1/vision/detection deepstack-ai_1 | [GIN] 2020/07/16 - 17:50:05 | 200 | 2.240648063s | 172.31.0.3 | POST /v1/vision/detection deepstack-ai_1 | [GIN] 2020/07/16 - 17:50:07 | 200 | 4.497818932s | 172.31.0.3 | POST /v1/vision/detection trigger_1 | 2020-07-16T12:49:56-05:00 [Trigger North Road] /aiinput/northroadSD.20200716_124956037.jpg: Analyzing trigger_1 | 2020-07-16T12:50:00-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125000010.jpg: Analyzing trigger_1 | 2020-07-16T12:50:00-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125000010.jpg: Analyzing trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger North Road] /aiinput/northroadSD.20200716_125001063.jpg: Analyzing trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger North Road] /aiinput/northroadSD.20200716_124956037.jpg: Found at least one object in the photo. (4922 ms) trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger North Road] /aiinput/northroadSD.20200716_124956037.jpg: Matched triggering object car trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger North Road] /aiinput/northroadSD.20200716_124956037.jpg: Confidence 86.45112499999999 meets threshold 0 and 100 trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger North Road] Prediction region (518, 175, 558, 204) blocked by trigger mask (491, 165, 640, 209). trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger North Road] /aiinput/northroadSD.20200716_124956037.jpg: Not triggered by car (86.45112499999999) trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125000010.jpg: Analysis failed trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125000010.jpg: Analysis failed trigger_1 | 2020-07-16T12:50:01-05:00 [Trigger North Road] /aiinput/northroadSD.20200716_125001063.jpg: Analysis failed trigger_1 | 2020-07-16T12:50:03-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125002539.jpg: Analyzing trigger_1 | 2020-07-16T12:50:03-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Analyzing trigger_1 | 2020-07-16T12:50:05-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125002539.jpg: Found at least one object in the photo. (2253 ms) trigger_1 | 2020-07-16T12:50:05-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125002539.jpg: Detected object car is not in the watch objects list [person, cat, dog] trigger_1 | 2020-07-16T12:50:05-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125002539.jpg: Not triggered by car (78.36) trigger_1 | 2020-07-16T12:50:05-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125002539.jpg: Detected object car is not in the watch objects list [person, cat, dog] trigger_1 | 2020-07-16T12:50:05-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125002539.jpg: Not triggered by car (60.057559999999995) trigger_1 | 2020-07-16T12:50:05-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125002539.jpg: Detected object truck is not in the watch objects list [person, cat, dog] trigger_1 | 2020-07-16T12:50:05-05:00 [Trigger Front Driveway not cars] /aiinput/drivewaysd.20200716_125002539.jpg: Not triggered by truck (40.02356) trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Found at least one object in the photo. (4511 ms) trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Matched triggering object car trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Confidence 78.36 meets threshold 0 and 100 trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] Prediction region (136, 80, 526, 262) blocked by trigger mask (33, 85, 460, 251). trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Not triggered by car (78.36) trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Matched triggering object car trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Confidence 60.057559999999995 meets threshold 0 and 100 trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] Prediction region (256, 0, 301, 11) blocked by trigger mask (257, 0, 314, 16). trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Not triggered by car (60.057559999999995) trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Matched triggering object truck trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Confidence 40.02356 meets threshold 0 and 100 trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] Prediction region (175, 80, 532, 261) blocked by trigger mask (33, 85, 460, 251). trigger_1 | 2020-07-16T12:50:07-05:00 [Trigger Front Driveway cars] /aiinput/drivewaysd.20200716_125002539.jpg: Not triggered by truck (40.02356)
I'm moving the settings update issue over to a new issue: https://github.com/danecreekphotography/node-deepstackai-trigger/issues/346. Let's chat about it over there.
Thanks!
Git won't let me tag you in the new issue. Can you please check it out and answer my follow up questions? Thanks!
What trouble are you having? I can't figure out how the masks coordinates are referenced.
I'm looking for more documentation on how masks are defined. See below image for reference.
Assuming the white box is my desired mask, what's the configuration in the triggers file?
I am currently inturpruting the masks documentation as:
Which in my file is:
"masks": [{"xMinimum": 375, "yMinimum": 129, "xMaximum": 104, "yMaximum": 36}],
But that doesn't seem to be working, but I also don't know how to determine if it's my mask that's at fault or if I have a different false positive.