You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
printf"[Unit]\nDescription=ArozOS Cloud Service\nAfter=systemd-networkd-wait-online.service\nWants=systemd-networkd-wait-online.service\n\n[Service]\nType=simple\nExecStartPre=/bin/sleep 10\nWorkingDirectory=/home/pi/arozos/src/\nExecStart=/bin/bash /home/pi/arozos/src/start.sh\n\nRestart=always\nRestartSec=10\n\n[Install]\nWantedBy=multi-user.target"| sudo tee -a ./arozos.service
59
+
60
+
echo"Registering systemctl service"
61
+
sudo systemctl start arozos.service
62
+
63
+
echo"Starting arozos"
64
+
sudo systemctl enable arozos.service
65
+
66
+
thisip=$(hostname -I | cut -d'' -f1)
67
+
echo"Installation completed. Visit ArozOS web UI with http://$thisip:8080"
Copy file name to clipboardExpand all lines: src/AGI Documentation.md
+51-2Lines changed: 51 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,6 +215,9 @@ one of these functions has to be called.
215
215
```
216
216
sendResp(string) => Response header with text/plain header
217
217
sendJSONResp(json_string) => Response request with JSON header
218
+
219
+
//Since v1.119
220
+
sendJSONResp(object) => Overload function, allow the same API to send Javascript object directly without the need for manual stringify using JSON.stringify
218
221
```
219
222
220
223
Customize header:
@@ -455,6 +458,7 @@ For glob and aglob, developer can pass in the following sorting modes (case sens
455
458
- largeToSmall
456
459
- mostRecent
457
460
- leastRecent
461
+
- smart (Added in v1.119, AGI only, for sorting filename containing digits with no zero pads)
458
462
459
463
```
460
464
//Example for sorting the desktop files to largeToSmall
//Classify an image using neural network, since v1.119
510
+
imagelib.classify("tmp:/classify.jpg", "yolo3");
511
+
512
+
```
513
+
514
+
#### Crop Image Options
515
+
516
+
```
506
517
Crop the given image with the following arguemnts:
507
518
508
519
1) Input file (virtual path)
@@ -513,12 +524,50 @@ Crop the given image with the following arguemnts:
513
524
6) Crop Height
514
525
515
526
return true if success, false if failed
516
-
*/
527
+
```
528
+
529
+
517
530
531
+
#### AI Classifier Options (since v1.119)
532
+
533
+
**ImageLib AI Classifier requires darknet to operate normally. If your ArozOS is a trim down version or using a host architecture that ArozOS did not ship with a valid darknet binary executable in ```system/neuralnet/``` folder, this will always return```false```.**
534
+
535
+
```
536
+
Classify allow the following classifier options
518
537
538
+
1) default / darknet19
539
+
2) yolo3
519
540
```
520
541
542
+
The output of the classifier will output the followings
543
+
544
+
```
545
+
Name (string, the name of object detected)
546
+
Percentage (float, the confidence of detection)
547
+
Positions (integer array, the pixel location of the detected object in left, top, width, height sequence)
548
+
```
549
+
550
+
Here is an example code for parsing the output, or you can also directly throw it into the JSON stringify and process it on frontend
551
+
552
+
```javascript
553
+
var results =imagelib.classify("tmp:/classify.jpg");
554
+
var responses = [];
555
+
for (var i =0; i <results.length; i++){
556
+
responses.push({
557
+
"object": results[i].Name,
558
+
"confidence": results[i].Percentage,
559
+
"position_x": results[i].Positions[0],
560
+
"position_y": results[i].Positions[1],
561
+
"width": results[i].Positions[2],
562
+
"height": results[i].Positions[3]
563
+
});
564
+
}
565
+
```
566
+
567
+
568
+
521
569
### http
570
+
522
571
A basic http function group that allow GET / POST / HEAD / Download request to other web resources
0 commit comments