|
|
@@ -1,11 +1,4 @@
|
|
|
-{% extends "base.html" %}
|
|
|
-{% load staticfiles %}
|
|
|
-
|
|
|
-{% block title %}
|
|
|
-人脸识别开放平台
|
|
|
-{% endblock %}
|
|
|
-
|
|
|
-{% block content %}
|
|
|
+{% extends "base.html" %} {% load static %} {% block title %} 人脸识别开放平台 {% endblock %} {% block content %}
|
|
|
<link href="{% static 'css/news.css' %}" rel="stylesheet">
|
|
|
<link rel="stylesheet" href="{% static 'css/codemirror.css' %}">
|
|
|
<script src="{% static 'js/codemirror.js' %}"></script>
|
|
|
@@ -54,8 +47,7 @@
|
|
|
人脸检测
|
|
|
</button>
|
|
|
<!-- 模态框(Modal) -->
|
|
|
- <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
|
|
- aria-hidden="true">
|
|
|
+ <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
<div class="modal-dialog">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
@@ -67,8 +59,7 @@
|
|
|
</h4>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
- <img id="photoIn" src="{% static 'img/sample.png' %}" class="img-responsive"
|
|
|
- style="max-width:250px">
|
|
|
+ <img id="photoIn" src="{% static 'img/sample.png' %}" class="img-responsive" style="max-width:250px">
|
|
|
<input type="file" id="photo" name="photo" />
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
@@ -78,23 +69,25 @@
|
|
|
开始检测
|
|
|
</button>
|
|
|
</div>
|
|
|
- </div><!-- /.modal-content -->
|
|
|
- </div><!-- /.modal -->
|
|
|
+ </div>
|
|
|
+ <!-- /.modal-content -->
|
|
|
+ </div>
|
|
|
+ <!-- /.modal -->
|
|
|
</div>
|
|
|
<script>
|
|
|
- $(function () {
|
|
|
- $('#photo').on('change', function () {
|
|
|
+ $(function() {
|
|
|
+ $('#photo').on('change', function() {
|
|
|
var r = new FileReader();
|
|
|
f = document.getElementById('photo').files[0];
|
|
|
r.readAsDataURL(f);
|
|
|
- r.onload = function (e) {
|
|
|
+ r.onload = function(e) {
|
|
|
document.getElementById('photoIn').src = this.result;
|
|
|
};
|
|
|
});
|
|
|
});
|
|
|
</script>
|
|
|
<script>
|
|
|
- $('#compute').click(function () {
|
|
|
+ $('#compute').click(function() {
|
|
|
formdata = new FormData();
|
|
|
var file = $("#photo")[0].files[0];
|
|
|
formdata.append("image", file);
|
|
|
@@ -127,8 +120,7 @@
|
|
|
</br>
|
|
|
<h4><strong>接口描述:</strong></h4>
|
|
|
<p>
|
|
|
- 人脸检测,此接口多用于调用人脸识别、人脸比对的接口之前,用于从图像数据中检测出人脸区域,并以
|
|
|
- 矩形框形式返回人脸检测结果。目前该接口仅供测试使用,调用该接口暂时不限制调用次数。
|
|
|
+ 人脸检测,此接口多用于调用人脸识别、人脸比对的接口之前,用于从图像数据中检测出人脸区域,并以 矩形框形式返回人脸检测结果。目前该接口仅供测试使用,调用该接口暂时不限制调用次数。
|
|
|
</p>
|
|
|
|
|
|
</br>
|