智慧工地算法接口服务

零. SpringBoot视频抽帧系统服务

在浏览器地址栏中输入:

http://47.97.252.139:38089/invokeAlgorithm?videoURL=http://hls01open.ys7.com/openlive/daa7e3cc971b4cf99e38f5b0b8925068.hd.m3u8&algorithmType=(1)
image.png

返回以上结果表示服务正常,如服务出现问题,
登录47.97.252.139服务器

cd /home/junyang
ps -ef | grep java
kill -9 18956 
image.png

随后运行以下命令重启springboot服务

nohup java -jar detection-system-1.0.0-SNAPSHOT.jar  --spring.profiles.active=mas &

一. 安全帽检测

在浏览器地址栏中输入:

http://47.97.252.139:38015/docs
image.png

在参数栏输入:

https://pic2.zhimg.com/80/v2-597bc3bcbaff16846cf53527e93345e5_1440w.jpg

测试链接:

curl -X 'POST' \
  'http://47.97.252.139:38015/helmet_detection' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'img_url=https%3A%2F%2Fpic2.zhimg.com%2F80%2Fv2-597bc3bcbaff16846cf53527e93345e5_1440w.jpg'

测试结果:

{
  "helmet_box": "[{\"class\": \"hat\", \"confidence\": 0.999287486076355, \"x_min\": 572, \"y_min\": 81, \"x_max\": 679, \"y_max\": 214}, {\"class\": \"hat\", \"confidence\": 0.998981237411499, \"x_min\": 434, \"y_min\": 99, \"x_max\": 511, \"y_max\": 201}, {\"class\": \"hat\", \"confidence\": 0.998002290725708, \"x_min\": 336, \"y_min\": 89, \"x_max\": 412, \"y_max\": 203}, {\"class\": \"hat\", \"confidence\": 0.9955688118934631, \"x_min\": 45, \"y_min\": 89, \"x_max\": 161, \"y_max\": 218}, {\"class\": \"hat\", \"confidence\": 0.9939324259757996, \"x_min\": 139, \"y_min\": 101, \"x_max\": 220, \"y_max\": 224}]"
}

二. 口罩检测

在浏览器地址栏中输入:

http://47.97.252.139:38013/docs 
image.png

在参数栏输入:

https://www.sensoro.com/zh/img/intelligent/ai_business@2x.png

测试链接:

curl -X 'POST' \
  'http://47.97.252.139:38013/face_mask_detection' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'img_url=https%3A%2F%2Fwww.sensoro.com%2Fzh%2Fimg%2Fintelligent%2Fai_business%402x.png'

测试结果:

{
  "mask_box": "[{\"class\": \"NoMask\", \"confidence\": 0.9992926120758057, \"x_min\": 523, \"y_min\": 205, \"x_max\": 874, \"y_max\": 648}]"
}

三. 明火烟雾检测

在浏览器地址栏中输入http://47.97.252.139:38014/docs 进入
在参数栏输入:

https://nimg.ws.126.net/?url=http%3A%2F%2Fcms-bucket.nosdn.127.net%2Fcatchpic%2F1%2F18%2F182de293ddf010291a624f6ef9d1e13d.jpg&thumbnail=660x2147483647&quality=80&type=jpg

测试链接:

curl -X 'POST' \
  'http://47.97.252.139:38014/fire_detection' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'img_url=https%3A%2F%2Fnimg.ws.126.net%2F%3Furl%3Dhttp%253A%252F%252Fcms-bucket.nosdn.127.net%252Fcatchpic%252F1%252F18%252F182de293ddf010291a624f6ef9d1e13d.jpg%26thumbnail%3D660x2147483647%26quality%3D80%26type%3Djpg'

测试结果:

{
  "fire_box": "[{\"class\": \"fire\", \"confidence\": 0.8020460605621338, \"x_min\": 305, \"y_min\": 193, \"x_max\": 363, \"y_max\": 299}, {\"class\": \"smoke\", \"confidence\": 0.5206751823425293, \"x_min\": 38, \"y_min\": 272, \"x_max\": 225, \"y_max\": 359}, {\"class\": \"smoke\", \"confidence\": 0.25511598587036133, \"x_min\": 309, \"y_min\": 34, \"x_max\": 520, \"y_max\": 204}]"
}

四. 反光衣检测

在浏览器地址栏中输入:

http://47.97.252.139:38012/docs
image.png

在参数栏输入: jpeg图片token会过期,自己找相应图片替换

http://pics1.baidu.com/feed/b151f8198618367a920f43ff4af5d3d2b21ce59e.jpeg?token=15f49cc34953aa2109c53b4dc3b0d1d3&s=BFA04A81123A09800E90E0210300E052

测试链接:

curl -X 'POST' \
  'http://47.97.252.139:38012/reflective_clothes_detection' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'img_url=http%3A%2F%2Fpics1.baidu.com%2Ffeed%2Fb151f8198618367a920f43ff4af5d3d2b21ce59e.jpeg%3Ftoken%3D15f49cc34953aa2109c53b4dc3b0d1d3%26s%3DBFA04A81123A09800E90E0210300E052'

测试结果:

{
  "reflective_box": "[{\"class\": \"reflective_clothes\", \"confidence\": 0.9677734375, \"x_min\": 114, \"y_min\": 93, \"x_max\": 169, \"y_max\": 182}, {\"class\": \"reflective_clothes\", \"confidence\": 0.9653487205505371, \"x_min\": 291, \"y_min\": 45, \"x_max\": 358, \"y_max\": 155}, {\"class\": \"reflective_clothes\", \"confidence\": 0.886448860168457, \"x_min\": 187, \"y_min\": 65, \"x_max\": 211, \"y_max\": 101}]"
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容