Unverified Commit 5b2d0e85 authored by yuyu5333's avatar yuyu5333 Committed by GitHub

Merge pull request #73 from yuyu5333/CrowdHMTWeb

Crowd hmt web
parents 0953c3b9 f8104c17
*.pth
*.pyc
*.pkl
\ No newline at end of file
*.pkl
/djangoProject/djangoProject/static
No preview for this file type
......@@ -106,11 +106,35 @@ def insert_data_many_hmt_imagesclassification():
datalist = [
# 图像分类 语义分割 目标检测 行为识别 动作检测 语音文本
(
37, "Food-101", "Vgg16-dpconv-inception2", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
38, "Caltech101", "NasNet", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
39, "Caltech101", "ResNet34", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
40, "Caltech101", "ResNet34-dpconv", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
41, "Caltech101", "ResNet34-fire", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
42, "Caltech101", "ResNet34-inception1", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
43, "Caltech101", "ResNet34-inception2", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
44, "Caltech101", "ResNet34-svd", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
45, "Caltech101", "ResNext50", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
46, "Caltech101", "SeResNet34", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
(
47, "Caltech101", "Vgg", 167460, 5.23, 837396.14, 53.33, 80.19, 20.11, 5207456
),
# (
# 35, "Food-101", "ResNet50-inception2", 173210, 7.07, 866080.95, 72.27, 73.28, 27.13, 7041440
# ),
]
connect.executemany(inset_sql, datalist)
......@@ -143,7 +167,19 @@ def insert_data_many_hmt_classdatasetmodel():
datalist = [
# 图像分类 语义分割 目标检测 行为识别 动作检测 语音文本
(
25, "图像分类", "Food-101", "ResNet50"
26, "图像分类", "Caltech101", "ResNet34"
),
(
27, "图像分类", "Caltech101", "NasNet"
),
(
28, "图像分类", "Caltech101", "ResNext50"
),
(
29, "图像分类", "Caltech101", "SeResNet34"
),
(
30, "图像分类", "Caltech101", "Vgg16"
),
]
......@@ -169,13 +205,40 @@ def update_data():
datalist = [
# 图像分类 语义分割 目标检测 行为识别 动作检测 语音文本
(
123378432, 27
11210432, 13
),
(
1892032, 14
),
(
890688, 15
),
(
1932992, 16
),
(
1528512, 17
),
(
3182272, 18
),
(
21270208, 19
),
(
2514624, 20
),
(
1513280, 21
),
(
2555584, 22
),
(
121850560, 28
2151104, 23
),
(
125028032, 29
3804864, 24
),
]
......@@ -320,11 +383,11 @@ if __name__ == "__main__":
# insert_data()
# insert_data_many_hmt_imagesclassification()
insert_data_many_hmt_imagesclassification()
# insert_data_many_hmt_classdatasetmodel()
update_data()
# update_data()
# update_table_name()
......
......@@ -117,10 +117,18 @@ USE_TZ = True
STATIC_URL = 'static/'
# STATICFILES_DIRS = [
# os.path.join(BASE_DIR, 'static'),
# ]
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
'/home/dell/CrowdHMT/Crowd-Platform-Web/djangoProject/djangoProject/static',
]
# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title></title>
</head>
<body>
<noscript>
<strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title></title><link href=/css/chunk-0da218a8.eafac379.css rel=prefetch><link href=/css/chunk-28a09d06.9720c9a9.css rel=prefetch><link href=/css/chunk-2b992e74.aa96956e.css rel=prefetch><link href=/css/chunk-2bc848a2.c218f9e9.css rel=prefetch><link href=/css/chunk-68f53e97.eef23643.css rel=prefetch><link href=/css/chunk-bb29380e.abb9f671.css rel=prefetch><link href=/css/chunk-fd0205b4.01204a27.css rel=prefetch><link href=/js/chunk-0da218a8.76e30228.js rel=prefetch><link href=/js/chunk-28a09d06.a1d89ccb.js rel=prefetch><link href=/js/chunk-2b992e74.2baf09de.js rel=prefetch><link href=/js/chunk-2bc848a2.86f2c815.js rel=prefetch><link href=/js/chunk-68f53e97.6a784a8f.js rel=prefetch><link href=/js/chunk-bb29380e.b592fff0.js rel=prefetch><link href=/js/chunk-fd0205b4.bf7b9941.js rel=prefetch><link href=/css/app.cf7286b7.css rel=preload as=style><link href=/css/chunk-vendors.f12f2b4c.css rel=preload as=style><link href=/js/app.084b2c02.js rel=preload as=script><link href=/js/chunk-vendors.9ebb6c01.js rel=preload as=script><link href=/css/chunk-vendors.f12f2b4c.css rel=stylesheet><link href=/css/app.cf7286b7.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.9ebb6c01.js></script><script src=/js/app.084b2c02.js></script></body></html>
\ No newline at end of file
......@@ -5,35 +5,34 @@ from hmt.myviews import android
urlpatterns = [
path('get-sysmodel/', views.ReturnSysModelDeviceLatency.as_view()),
path('upload-usermodel/', views.UploadUserModel.as_view()),
path('check-usermodel/', views.CheckUserModel.as_view()),
path('get-usermodel/', views.ReturnUserModelStatus.as_view()),
path('get-usermodelstruct/', views.ReturnUserModelStruct.as_view()),
path('api/get-sysmodel/', views.ReturnSysModelDeviceLatency.as_view()),
path('api/upload-usermodel/', views.UploadUserModel.as_view()),
path('api/check-usermodel/', views.CheckUserModel.as_view()),
path('api/get-usermodel/', views.ReturnUserModelStatus.as_view()),
path('api/get-usermodelstruct/', views.ReturnUserModelStruct.as_view()),
path('get-device/', views.ReturnDeviceStatus.as_view()),
path('get-mission/', views.ReturnMissionStatus.as_view()),
path('get-classdatasetmodel/', views.ReturnClassDatasetModel.as_view()),
path('get-classdatasetmodelInfo/', views.ReturnClassDatasetModelInfo.as_view()),
path('get-classdatasetcompressmodel/', views.ReturnClassDatasetCompressModel.as_view()),
path('get-cdpcompressmodel/', views.ReturnCDPCompressModel.as_view()),
path('api/get-device/', views.ReturnDeviceStatus.as_view()),
path('api/get-mission/', views.ReturnMissionStatus.as_view()),
path('api/get-classdatasetmodel/', views.ReturnClassDatasetModel.as_view()),
path('api/get-classdatasetmodelInfo/', views.ReturnClassDatasetModelInfo.as_view()),
path('api/get-classdatasetcompressmodel/', views.ReturnClassDatasetCompressModel.as_view()),
path('api/get-cdpcompressmodel/', views.ReturnCDPCompressModel.as_view()),
path('compress-model/', views.ReturnCompressModel.as_view()),
path('api/compress-model/', views.ReturnCompressModel.as_view()),
# path('ip-connect/', views.ConnectReturnDevice.as_view())
path('raspberry/',views.raspberry),
path('jetson/',views.jetson),
path('mcu/',views.mcu),
path('android/', android.DeviceAndroid.as_view()),
path('android/', android.DeviceAndroid.as_view()),
path('segmentationlatency/',views.segmentation_latency),
re_path('^download-model/', views.DownloadCompressModel.as_view()),
re_path('^download-sysmodel/', views.DownloadSysModel.as_view()),
re_path('^download-sysmodelcode/', views.DownloadSysModelCode.as_view()),
re_path('^download-modeldefinition/', views.DownloadModeldefinition.as_view()),
path('api/raspberry/',views.raspberry),
path('api/jetson/',views.jetson),
path('api/mcu/',views.mcu),
path('api/android/', android.DeviceAndroid.as_view()),
path('api/segmentationlatency/',views.segmentation_latency),
re_path('api/^download-model/', views.DownloadCompressModel.as_view()),
re_path('api/^download-sysmodel/', views.DownloadSysModel.as_view()),
re_path('api/^download-sysmodelcode/', views.DownloadSysModelCode.as_view()),
re_path('api/^download-modeldefinition/', views.DownloadModeldefinition.as_view()),
# path('ip-connect/', views.ConnectReturnDevice.as_view())
]
......@@ -36,15 +36,15 @@ import torch.nn as nn
import time
from thop import clever_format
# from hmt.views.nodegraph import optimal
from uploadusermodel.profile_my import profile
# from uploadusermodel.checkmodel_util import test
# from uploadusermodel.checkmodel_util import model_user
from uploadusermodel.checkmodel_util import test
from uploadusermodel.checkmodel_util import model_user
from Luohao.optimation import readdata
from Luohao.exe.scp import scp_send_files
# from hmt.views.nodegraph import optimal #路径必须这么写才行,django的根目录开始,默认从django的根目录开始识别
# Create your views here.
......@@ -144,6 +144,7 @@ class ReturnUserModelStatus(APIView):
# if getCheck == True:
# model, input = model_user()
# return Response("this function is loading")
model, input = model_user()
......@@ -192,6 +193,9 @@ class ReturnUserModelStatus(APIView):
class ReturnUserModelStruct(APIView):
def post(self, request):
# return Response("this function is loading")
model, input = model_user()
modelStruct = getusermodelStruct(model)
......@@ -433,7 +437,11 @@ def modelLatency(model, input):
print("Latency: ", Latency)
return Latency
def modelCheck(filename):
# return Response("this function is loading")
is_error = 0
ChangeUserModelCodeName(filename)
print("修改数据完成")
......@@ -454,6 +462,7 @@ def modelCheck(filename):
print("Check pass")
return True
def ChangeUserModelCodeName(filename):
# 修改文件名(修改内容重新到新的文件)
# 再去获得数据()
......@@ -501,7 +510,6 @@ class ReturnSysModelDeviceLatency(APIView):
sysdevicelatency_data.update({temp_device : temp_latency})
sysdevicelatency_data.update(sysmodel_serializer.data)
for temp_k,temp_v in sysdevicelatency_data.items():
if temp_v == -1 or temp_v is None:
......@@ -1111,8 +1119,8 @@ def get_resourceinfo(request):
data_raspberry = {"CPU_Arch": "armv7l",
"OS_Version": "Raspbian GNU/Linux 10",
"RAM_Total": 0,
"CPU_Use": "1.5",
"MEM_Use": 15.99888854,
"CPU_Use": "24.5",
"MEM_Use": 45.99888854,
"DISK_Free": ""}
data_raspberry = json.dumps(data_raspberry)
......@@ -1141,8 +1149,8 @@ def raspberry(request):
data_jetson = {
"DEVICE_NAME": "NVIDIA Jetson",
"CPU_Use": "1.5",
"GPU_Use":'0',
"MEM_Use": 15.99888854,
"GPU_Use":'18.18',
"MEM_Use": 53.99888854,
"DISK_Free": "75"}
data_jetson = json.dumps(data_jetson)
......@@ -1167,7 +1175,7 @@ def jetson(request):
data_mcu = {
"DEVICE_NAME": "ESP-32",
"CPU_Use": "1.5",
"CPU_Use": "7.5",
"MEM_Use": 15.99888854}
data_mcu = json.dumps(data_mcu)
......
.DS_Store
node_modules
/dist
/dist*
package-lock.json
......
iview-admin-master/public/hmtlogo_web.ico

4.19 KB

......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" href="<%= BASE_URL %>hmtlogo_web.ico">
<title></title>
</head>
<body>
......
iview-admin-master/src/assets/images/HMTlogo_home1_new.png

50.8 KB

iview-admin-master/src/assets/images/HMTlogo_home2_new.png

46.7 KB

iview-admin-master/src/assets/images/TaiyiBackground.png

8.32 MB

iview-admin-master/src/assets/images/contact.png

46.2 KB

iview-admin-master/src/assets/images/logomax.png

18.9 KB | W: 0px | H: 0px

iview-admin-master/src/assets/images/logomax.png

36.7 KB | W: 0px | H: 0px

iview-admin-master/src/assets/images/logomax.png
iview-admin-master/src/assets/images/logomax.png
iview-admin-master/src/assets/images/logomax.png
iview-admin-master/src/assets/images/logomax.png
  • 2-up
  • Swipe
  • Onion skin
iview-admin-master/src/assets/images/logomin_new.png

31 KB

......@@ -44,6 +44,7 @@ export default {
return {
form: {
userName: 'super_admin',
// userName: 'wyz',
password: ''
}
}
......
......@@ -46,7 +46,7 @@ import ErrorStore from './components/error-store'
import { mapMutations, mapActions, mapGetters } from 'vuex'
import { getNewTagList, routeEqual } from '@/libs/util'
import routers from '@/router/routers'
import minLogo from '@/assets/images/logomin.png'
import minLogo from '@/assets/images/logomin_new.png'
import maxLogo from '@/assets/images/logomax.png'
import './main.less'
export default {
......
......@@ -2,7 +2,7 @@ export default {
/**
* @description 配置显示在浏览器标签的title
*/
title: 'iView-admin',
title: '“太易”中间件',
/**
* @description token在Cookie中存储的天数,默认1天
*/
......@@ -18,7 +18,8 @@ export default {
*/
baseUrl: {
dev: 'https://www.easy-mock.com/mock/5add9213ce4d0e69998a6f51/iview-admin/',
pro: 'https://produce.com'
// pro: 'https://produce.com'
pro: 'http://taiyi.crowdhmt.com:8122/'
},
/**
* @description 默认打开的首页的路由name值,默认为home
......
......@@ -19,41 +19,50 @@ const turnTo = (to, access, next) => {
else next({ replace: true, name: 'error_401' }) // 无权限,重定向到401页面
}
router.beforeEach((to, from, next) => {
// router.beforeEach((to, from, next) => {
console.log(to, from, next);
// console.log(to, from, next);
iView.LoadingBar.start()
const token = getToken()
if (!token && to.name !== LOGIN_PAGE_NAME) {
// 未登录且要跳转的页面不是登录页
next({
name: LOGIN_PAGE_NAME // 跳转到登录页
})
} else if (!token && to.name === LOGIN_PAGE_NAME) {
// 未登陆且要跳转的页面是登录页
next() // 跳转
} else if (token && to.name === LOGIN_PAGE_NAME) {
// 已登录且要跳转的页面是登录页
// iView.LoadingBar.start()
// const token = getToken()
// if (!token && to.name !== LOGIN_PAGE_NAME) {
// // 未登录且要跳转的页面不是登录页
// next({
// name: LOGIN_PAGE_NAME // 跳转到登录页
// })
// } else if (!token && to.name === LOGIN_PAGE_NAME) {
// // 未登陆且要跳转的页面是登录页
// next() // 跳转
// } else if (token && to.name === LOGIN_PAGE_NAME) {
// // 已登录且要跳转的页面是登录页
// next({
// name: homeName // 跳转到homeName页
// })
// } else {
// if (store.state.user.hasGetInfo) {
// turnTo(to, store.state.user.access, next)
// } else {
// store.dispatch('getUserInfo').then(user => {
// // 拉取用户信息,通过用户权限和跳转的页面的name来判断是否有权限访问;access必须是一个数组,如:['super_admin'] ['super_admin', 'admin']
// turnTo(to, user.access, next)
// }).catch(() => {
// setToken('')
// next({
// name: 'login'
// })
// })
// }
// }
// })
router.beforeEach((to, from, next) => {
console.log(to, from, next);
iView.LoadingBar.start();
next({
name: homeName // 跳转到homeName页
})
} else {
if (store.state.user.hasGetInfo) {
turnTo(to, store.state.user.access, next)
} else {
store.dispatch('getUserInfo').then(user => {
// 拉取用户信息,通过用户权限和跳转的页面的name来判断是否有权限访问;access必须是一个数组,如:['super_admin'] ['super_admin', 'admin']
turnTo(to, user.access, next)
}).catch(() => {
setToken('')
next({
name: 'login'
})
})
}
}
})
// name: 'home' // 跳转到homeName页
})
});
router.afterEach(to => {
setTitle(to, router.app)
......
......@@ -51,15 +51,7 @@ export default [
}
]
},
// {
// path: '',
// name: 'doc',
// meta: {
// title: '文档',
// href: 'https://lison16.github.io/iview-admin-doc/#/',
// icon: 'ios-book'
// }
// },
/* home page by wyz
{
path: '/hmthome',
name: '_hmthome',
......@@ -79,6 +71,7 @@ export default [
}
]
},
*/
{
path: '/cog_natural',
name: 'cog_natural',
......@@ -125,33 +118,33 @@ export default [
},
component: () => import('@/view/ModelPerformanceEvaluation/Predefined_model.vue')
},
{
path: 'User_defined_model',
name: 'User_defined_model',
meta: {
icon: 'md-clipboard',
title: '上传模型'
},
component: () => import('@/view/ModelPerformanceEvaluation/User_defined_model.vue')
},
{
path: 'model-test1',
name: 'model-test1',
meta: {
icon: 'md-clipboard',
title: '测试1'
},
component: () => import('@/view/ModelPerformanceEvaluation/test.vue')
},
{
path: 'model-test2',
name: 'model-test2',
meta: {
icon: 'md-clipboard',
title: '测试2'
},
component: () => import('@/view/ModelPerformanceEvaluation/test2.vue')
},
// {
// path: 'User_defined_model',
// name: 'User_defined_model',
// meta: {
// icon: 'md-clipboard',
// title: '上传模型'
// },
// component: () => import('@/view/ModelPerformanceEvaluation/User_defined_model.vue')
// },
// {
// path: 'model-test1',
// name: 'model-test1',
// meta: {
// icon: 'md-clipboard',
// title: '测试1'
// },
// component: () => import('@/view/ModelPerformanceEvaluation/test.vue')
// },
// {
// path: 'model-test2',
// name: 'model-test2',
// meta: {
// icon: 'md-clipboard',
// title: '测试2'
// },
// component: () => import('@/view/ModelPerformanceEvaluation/test2.vue')
// },
]
},
{
......
......@@ -361,13 +361,33 @@
</p>
</Row>
<Row>
<Button type="primary" style="margin-left: 45%">
<!--
<Button type="primary" style="margin-left: 45%">
<a :href="'download-model/?model=' + CDCompressModelStatus.ModelName" style="color: white">下载模型
</a>
</Button>
-->
<Button type="primary" @click="openModal" style="margin-left: 45%">下载模型</Button>
</Row>
</card>
<div><br/></div></div>
<div><br/></div>
<div id="myModal" class="modal">
<div class="modal-content">
<Row>
<img class="modal-image" src="../../assets/images/contact.png" alt="弹窗图片">
<div class="my-image-close"></div>
<span class="close">&times;</span>
</Row>
<Row>
<button class="close-button" @click="closeModal">关闭</button>
</Row>
</div>
</div>
</div>
</template>
<script scoped>
......@@ -555,7 +575,7 @@ export default {
},
getClassDatasetModelsInfo() {
axios
.post("get-classdatasetmodelInfo/", {
.post("api/get-classdatasetmodelInfo/", {
ClassName: this.selectedValueClass,
DatasetName: this.selectedValueDataSet,
ModelName: this.selectedmodelsClassDataset,
......@@ -570,7 +590,7 @@ export default {
getClassDatasetModelsName() {
if (this.selectedValueClass && this.selectedValueDataSet) {
axios
.post("get-classdatasetmodel/", {
.post("api/get-classdatasetmodel/", {
ClassName: this.selectedValueClass,
DatasetName: this.selectedValueDataSet,
})
......@@ -587,7 +607,7 @@ export default {
getCDCompressModel() {
if (this.selectedValueClass && this.selectedValueDataSet) {
axios
.post("get-classdatasetcompressmodel/", {
.post("api/get-classdatasetcompressmodel/", {
ClassName: this.selectedValueClass,
DatasetName: this.selectedValueDataSet,
ModelName: this.selectedmodelsClassDataset,
......@@ -606,7 +626,7 @@ export default {
getCDPCompressModel() {
if (this.selectedValueClass && this.selectedValueDataSet) {
axios
.post("get-cdpcompressmodel/", {
.post("api/get-cdpcompressmodel/", {
ClassName: this.selectedValueClass,
DatasetName: this.selectedValueDataSet,
ModelName: this.selectedmodelsClassDataset,
......@@ -633,7 +653,7 @@ export default {
},
addDataAndroid() {
axios
.get("android/")
.get("api/android/")
.then((response) => {
console.log(response.data);
this.CPU_Use_And = parseFloat(response.data.CPU_Use).toFixed(3)
......@@ -646,7 +666,7 @@ export default {
},
addDataMcu() {
axios
.get("mcu/")
.get("api/mcu/")
.then((response) => {
console.log(response.data);
this.CPU_Use_mcu = parseFloat(response.data.CPU_Use).toFixed(3)
......@@ -660,7 +680,7 @@ export default {
addDataRaspberry() {
axios
// 3.1url地址
.get("raspberry/")
.get("api/raspberry/")
// 3.2成功时回调函数
.then((response) => {
console.log(response);
......@@ -675,7 +695,7 @@ export default {
},
addDataJetson() {
axios
.get("jetson/")
.get("api/jetson/")
.then((response) => {
console.log(response);
this.CPU_Use_JET = parseFloat(response.data.CPU_Use).toFixed(3)
......@@ -685,6 +705,12 @@ export default {
this.GPU_Use_JET = parseFloat(response.data.GPU_Use).toFixed(3)
})
},
openModal() {
document.getElementById('myModal').style.display = 'block';
},
closeModal() {
document.getElementById('myModal').style.display = 'none';
}
},
components: {
CompressImages,
......@@ -754,14 +780,14 @@ export default {
margin-top: 15px;
font-size: 17px;
}
/*
img {
vertical-align: middle;
border-radius: 50%;
width: 110px;
height: 110px;
}
*/
.popup {
position: fixed;
top: 50%;
......@@ -789,4 +815,50 @@ img {
filter: grayscale(0%);
}
.modal {
display: none;
position: fixed;
z-index: 9999;
left: 5%;
top: 25%;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, );
overflow: auto;
}
.modal-content {
position: relative;
background-color: #fff;
margin: auto;
padding: 20px;
width: 80%;
max-width: 600px;
text-align: center;
}
.modal-image {
max-width: 100%;
max-height: 100%;
}
.close {
position: absolute;
top: 10px;
right: 10px;
font-size: 20px;
font-weight: bold;
color: #000;
cursor: pointer;
}
.my-image-close {
background-image: url('../../assets/images/contact.png');
background-repeat: no-repeat;
background-position: center center; /* 图片在容器中居中显示 */
width: 100%; /* 宽度自适应父容器 */
height: 100%; /* 高度自适应父容器 */
}
</style>
......@@ -155,36 +155,39 @@
<Divider style="margin: 12px 0px" />
<Row style="margin-top: 10px">
<Button
<!-- <Button
type="primary"
style="font-size: 18px"
class="model-evaluation"
>
<a
:href="
'download-sysmodel/?model=' +
'api/download-sysmodel/?model=' +
sysmodelStatus.SysModelName
"
style="color: white"
>
下载模型
</a>
</Button>
<Button
</Button> -->
<Button type="primary" @click="openModal">下载模型</Button>
<!-- <Button
type="primary"
style="margin-left: 10px; font-size: 18px"
class="model-evaluation"
>
<a
:href="
'download-sysmodelcode/?modelcode=' +
'api/download-sysmodelcode/?modelcode=' +
sysmodelStatus.SysModelName
"
style="color: white"
>
下载模型源代码
</a>
</Button>
</Button> -->
<Button type="primary" @click="openModal">下载模型源代码</Button>
</Row>
</card>
<Divider style="margin: 10px 0px" />
......@@ -201,6 +204,19 @@
</p>
</Row>
<br>
<div id="myModal" class="modal">
<div class="modal-content">
<Row>
<img class="modal-image" src="../../assets/images/contact.png" alt="弹窗图片">
<span class="close">&times;</span>
</Row>
<Row>
<button class="close-button" @click="closeModal">关闭</button>
</Row>
</div>
</div>
</card>
</div>
</template>
......@@ -249,7 +265,7 @@ export default {
checkSysModelChange(sysmodel) {
let that = this;
axios
.post("get-sysmodel/", {
.post("api/get-sysmodel/", {
SysModelName: sysmodel,
})
.then((response) => {
......@@ -259,7 +275,13 @@ export default {
},
goBackhome() {
this.$router.push('/')
}
},
openModal() {
document.getElementById('myModal').style.display = 'block';
},
closeModal() {
document.getElementById('myModal').style.display = 'none';
}
},
};
</script>
......@@ -300,4 +322,40 @@ export default {
.back-btn:hover {
background-color: #0069d9;
}
.modal {
display: none;
position: fixed;
z-index: 9999;
left: 5%;
top: 25%;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, );
overflow: auto;
}
.modal-content {
position: relative;
background-color: #fff;
margin: auto;
padding: 20px;
width: 80%;
max-width: 600px;
text-align: center;
}
.modal-image {
max-width: 100%;
max-height: 100%;
}
.close {
position: absolute;
top: 10px;
right: 10px;
font-size: 20px;
font-weight: bold;
color: #000;
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -288,7 +288,7 @@ export default {
return false;
},
goBackhome() {
this.$router.push('/hmthome/hmthome')
this.$router.push('/')
}
},
};
......
......@@ -28,21 +28,22 @@
</p>
</div>
<Row style="margin-top: 10px">
<Button
<!-- <Button
icon="md-download"
:loading="exportLoading"
>
<a
:href=
"
'download-modeldefinition/?modeldefinition=Modeldefinition'
'api/download-modeldefinition/?modeldefinition=Modeldefinition'
"
>
点击下载《模型定义规范》
</a>
<!-- Model definition -->
</Button>
</Button> -->
<Button type="primary" @click="openModal">点击下载《模型定义规范》</Button>
</Row>
<Row style="margin-top: 10px">
<Button
......@@ -55,7 +56,19 @@
</i-col>
</row>
<div id="myModal" class="modal">
<div class="modal-content">
<Row>
<img class="modal-image" src="../../assets/images/contact.png" alt="弹窗图片">
<span class="close">&times;</span>
</Row>
<Row>
<button class="close-button" @click="closeModal">关闭</button>
</Row>
</div>
</div>
</Card>
<!-- 模型定义规范 -->
......@@ -163,6 +176,8 @@
</div>
</row>
</Card> -->
</div>
</template>
......@@ -258,8 +273,14 @@ export default {
return highlight(code, languages.js); //returns html
},
goBack() {
this.$router.push('/hmthome/hmthome')
}
this.$router.push('/')
},
openModal() {
document.getElementById('myModal').style.display = 'block';
},
closeModal() {
document.getElementById('myModal').style.display = 'none';
}
},
};
</script>
......@@ -317,5 +338,40 @@ export default {
background-color: #0069d9;
}
.modal {
display: none;
position: fixed;
z-index: 9999;
left: 5%;
top: 25%;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, );
overflow: auto;
}
.modal-content {
position: relative;
background-color: #fff;
margin: auto;
padding: 20px;
width: 80%;
max-width: 600px;
text-align: center;
}
.modal-image {
max-width: 100%;
max-height: 100%;
}
.close {
position: absolute;
top: 10px;
right: 10px;
font-size: 20px;
font-weight: bold;
color: #000;
cursor: pointer;
}
</style>
......@@ -169,7 +169,7 @@
that.$refs.Memory_usage.getChange();
that.$refs.Disk_free.getChange();
if(device == 'Raspberry'){
axios.get('raspberry/').then(response =>{
axios.get('api/raspberry/').then(response =>{
that.CPU_Type = response.data.CPU_Type;
that.GPU_Type = response.data.GPU_Type;
that.CPU_Arch = response.data.CPU_Arch;
......@@ -178,7 +178,7 @@
})
}
else if(device == 'Jetson'){
axios.get('jetson/').then(response =>{
axios.get('api/jetson/').then(response =>{
that.CPU_Type = response.data.CPU_Type;
that.GPU_Type = response.data.GPU_Type;
that.CPU_Arch = response.data.CPU_Arch;
......@@ -187,7 +187,7 @@
})
}
else if(device == 'Android'){
axios.get('android/').then(response =>{
axios.get('api/android/').then(response =>{
that.CPU_Type = response.data.CPU_Type;
that.GPU_Type = response.data.GPU_Type;
that.CPU_Arch = response.data.CPU_Arch;
......@@ -196,7 +196,7 @@
})
}
else if(device == 'Mcu'){
axios.get('mcu/').then(response =>{
axios.get('api/mcu/').then(response =>{
that.CPU_Type = response.data.CPU_Type;
that.GPU_Type = response.data.GPU_Type;
that.CPU_Arch = response.data.CPU_Arch;
......
<style lang="less">
@import './login.less';
</style>
<template>
<div class="login">
<div class="login-con">
<div class="ivu-card">
<div class="ivu-card-head">
<p><i class="ivu-icon ivu-icon-log-in"></i> <span>欢迎登录</span></p>
</div>
<!---->
<div class="ivu-card-body">
<div class="form-con">
<form autocomplete="off" class="ivu-form ivu-form-label-right">
<div class="ivu-form-item ivu-form-item-required">
<!---->
<div class="ivu-form-item-content">
<div
class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type ivu-input-group ivu-input-group-default ivu-input-group-with-prepend">
<div class="ivu-input-group-prepend" style=""><span><i class="ivu-icon ivu-icon-ios-person"
style="font-size: 16px;"></i></span></div>
<div class="ivu-input-inner-container">
<!----> <i
class="ivu-icon ivu-icon-ios-loading ivu-load-loop ivu-input-icon ivu-input-icon-validate"></i>
<input autocomplete="off" spellcheck="false" type="text" placeholder="请输入用户名"
class="ivu-input ivu-input-default">
</div>
<!---->
</div>
<!---->
</div>
</div>
<div class="ivu-form-item ivu-form-item-required">
<!---->
<div class="ivu-form-item-content">
<div
class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type ivu-input-group ivu-input-group-default ivu-input-group-with-prepend">
<div class="ivu-input-group-prepend" style=""><span><i class="ivu-icon ivu-icon-md-lock"
style="font-size: 14px;"></i></span>
</div>
<div class="ivu-input-inner-container">
<!----> <i
class="ivu-icon ivu-icon-ios-loading ivu-load-loop ivu-input-icon ivu-input-icon-validate"></i>
<input autocomplete="off" spellcheck="false" type="password" placeholder="请输入密码"
class="ivu-input ivu-input-default">
</div>
<!---->
</div>
<!---->
</div>
</div>
<div class="ivu-form-item">
<!---->
<div class="ivu-form-item-content">
<button type="button" class="ivu-btn ivu-btn-primary ivu-btn-long">
<!----> <!----> <span>登录</span>
</button>
<!---->
</div>
</div>
</form>
<p class="login-tip">输入任意用户名和密码即可</p>
</div>
</div>
</div>
</div>
<!-- built files will be auto injected -->
<div class="ivu-loading-bar" style="height: 2px; display: none;">
<div class="ivu-loading-bar-inner ivu-loading-bar-inner-color-primary" style="width: 0%; height: 2px;"></div>
</div>
</div>
</template>
<script>
import LoginForm from '_c/login-form'
import { mapActions } from 'vuex'
export default {
components: {
LoginForm
},
methods: {
...mapActions([
'handleLogin',
'getUserInfo'
]),
handleSubmit({ userName, password }) {
this.handleLogin({ userName, password }).then(res => {
this.getUserInfo().then(res => {
this.$router.push({
name: this.$config.homeName
})
})
})
},
gohome() {
this.$router.push('/home')
}
}
}
</script>
<style></style>
.login{
width: 100%;
height: 100%;
background-image: url('../../assets/images/login-bg.jpg');
background-image: url('../../assets/images/TaiyiBackground.png');
background-size: cover;
background-position: center;
position: relative;
......
......@@ -30,9 +30,10 @@ export default {
handleSubmit ({ userName, password }) {
this.handleLogin({ userName, password }).then(res => {
this.getUserInfo().then(res => {
this.$router.push({
name: this.$config.homeName
})
// this.$router.push({
// name: this.$config.homeName
// })
this.$router.push('/home')
})
})
}
......
......@@ -145,7 +145,7 @@
</RadioGroup>
</FormItem>
<br>
<Button type="primary" @click="segmentation">推理评估</Button>
<Button type="primary" @click="openModal">推理评估</Button>
<!-- <Button type="primary" style="margin-left: 33px">模型推理</Button> -->
</Form>
</card>
......@@ -185,12 +185,23 @@
<!-- <div style="display: flex; justify-content: center; align-items: center; margin-left: -200px;">
<cartoon3 />
</div> -->
<div v-if="showModal" class="modal">
<!-- <div v-if="showModal" class="modal">
<div class="modal-content">
<cartoon3 />
<button @click="closeModal">Close</button>
</div>
</div>
</div> 原本动画-->
<div id="myModal" class="modal">
<div class="modal-content">
<Row>
<img class="modal-image" src="../../assets/images/contact.png" alt="弹窗图片">
<span class="close">&times;</span>
</Row>
<Row>
<button class="close-button" @click="closeModal">关闭</button>
</Row>
</div>
</div>
</card>
</div>
......@@ -261,7 +272,7 @@
addData() {
axios
// 3.1url地址
.get("raspberry/")
.get("api/raspberry/")
// 3.2成功时回调函数
.then((response) => {
console.log(response);
......@@ -285,7 +296,7 @@
},
addData_jetson() {
axios
.get("jetson/")
.get("api/jetson/")
.then((response) => {
console.log(response);
this.CPU_Use_JET = response.data.CPU_Use
......@@ -301,7 +312,7 @@
this.showModal = false;
}, 6000);
axios
.post("segmentationlatency/", {
.post("api/segmentationlatency/", {
device: this.formItem.device,
task: this.formItem.task,
target: this.formItem.target,
......@@ -323,7 +334,7 @@
android() {
axios
.get("android/")
.get("api/android/")
.then((response) => {
console.log(response.data);
this.CPU_Use_And = parseFloat(response.data.CPU_Use).toFixed(3)
......@@ -336,7 +347,7 @@
},
mcu() {
axios
.get("mcu/")
.get("api/mcu/")
.then((response) => {
console.log(response.data);
this.CPU_Use_mcu = parseFloat(response.data.CPU_Use).toFixed(3)
......@@ -346,6 +357,12 @@
this.CPU_Type_mcu = response.data.CPU_Type
})
},
openModal() {
document.getElementById('myModal').style.display = 'block';
},
closeModal() {
document.getElementById('myModal').style.display = 'none';
}
},
......@@ -395,7 +412,7 @@
font-size: 24px;
}
.modal {
/* .modal {
position: fixed;
top: 0;
left: 0;
......@@ -411,7 +428,41 @@
background-color: white;
padding: 20px;
border-radius: 4px;
}
} 原来动画*/
.modal {
display: none;
position: fixed;
z-index: 9999;
left: 5%;
top: 25%;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, );
overflow: auto;
}
.modal-content {
position: relative;
background-color: #fff;
margin: auto;
padding: 20px;
width: 80%;
max-width: 600px;
text-align: center;
}
.modal-image {
max-width: 100%;
max-height: 100%;
}
.close {
position: absolute;
top: 10px;
right: 10px;
font-size: 20px;
font-weight: bold;
color: #000;
cursor: pointer;
}
</style>
\ No newline at end of file
This diff is collapsed.
<template>
<div>
<Row :gutter="20">
<i-col :xs="12" :md="8" :lg="4" v-for="(infor, i) in inforCardData" :key="`infor-${i}`" style="height: 120px;padding-bottom: 10px;">
<infor-card shadow :color="infor.color" :icon="infor.icon" :icon-size="36">
<count-to :end="infor.count" count-class="count-style"/>
<p>{{ infor.title }}</p>
</infor-card>
</i-col>
</Row>
<Row :gutter="20" style="margin-top: 10px;">
<i-col :md="24" :lg="8" style="margin-bottom: 20px;">
<Card shadow>
<chart-pie style="height: 300px;" :value="pieData" text="用户访问来源"></chart-pie>
</Card>
</i-col>
<i-col :md="24" :lg="16" style="margin-bottom: 20px;">
<Card shadow>
<chart-bar style="height: 300px;" :value="barData" text="每周用户活跃量"/>
</Card>
</i-col>
</Row>
<Row>
<Card shadow>
<example style="height: 310px;"/>
</Card>
</Row>
<div style="display: flex; justify-content: center; align-items: center; margin-left: -200px;">
<my-component />
</div>
<div class="section-header-text-center" style="font-weight: bold; font-size: 1.2em;">
<h1 class="title" style="font-size: 3em;">核心模块</h1>
</div>
<div class="image-container" style="display: flex; justify-content: center; align-items: center;">
<row class="row">
<router-link tag="div" class="image" to="/cog_natural/cog_natural">
<img
src="/images/ziyuanganzhi.png"
alt="Image 1"
class="hover-animation"
v-b-tooltip.hover.top="imageDescription.deviceinfo"
/>
</router-link>
<div class="text">
<h2 class="bold-header">
<a
href="http://blog.crowdhmt.com/articles/embedded_Intelligence"
target="_blank"
style="background-color: rgba(255, 255, 255, 0.8)"
>设备资源感知</a
>
</h2>
<!-- <p>支持为用户上传模型定制模型压缩方案,缩减模型体量以满足设定资源</p> -->
<p></p>
<p>支持于多种智能设备以及资源受限平台上(支持MCU、树莓派、FPGA、</p>
<p>GPUnano、Jetson、Turtlebot、手机等数十种异构设备实时资源感知)</p>
</div>
</row>
<row class="row">
<router-link
tag="div"
class="image"
to="/ModelPerformaceEvaluation/firstpage"
>
<img
src="/images/moxingganzhi.png"
alt="Image 2"
class="hover-animation"
v-b-tooltip.hover.top="imageDescription.modelinfo"
/>
</router-link>
<div class="text">
<h2 class="bold-header">
<a
href="http://blog.crowdhmt.com/articles/mechanism"
target="_blank"
style="background-color: rgba(255, 255, 255, 0.8)"
>模型性能评估</a
>
</h2>
<!-- <p>支持为用户上传模型定制模型压缩方案,缩减模型体量以满足设定资源</p> -->
<p></p>
<p>支持用户自定义模型上传,评估硬件相关性能(能耗、时延),权重相</p>
<p>关性能(精度),模型结构相关性能(计算量、存储量)</p>
</div>
</row>
<row class="row">
<router-link tag="div" class="image" to="/ModelCompress/ModelCompress">
<img
src="/images/yasuo.png"
alt="Image 3"
class="hover-animation"
v-b-tooltip.hover.top="imageDescription.modelcompress"
/>
</router-link>
<div class="text">
<h2 class="bold-header">
<a
href="http://blog.crowdhmt.com/articles/model_compression"
target="_blank"
style="background-color: rgba(255, 255, 255, 0.8)"
>端自适应模型压缩</a
>
</h2>
<p></p>
<p>支持为用户上传模型定制模型压缩方案,缩减模型体量以满足设定资源</p>
<p>为了在计算资源有限的设备上部署模型,例如移动设备和嵌入式系统等</p>
</div>
</row>
<row class="row">
<router-link tag="div" class="image" to="/segmentation/segmentation">
<img
src="/images/fenge.png"
alt="Image 3"
class="hover-animation"
v-b-tooltip.hover.top="imageDescription.modelseg"
/>
</router-link>
<div class="text">
<h2 class="bold-header">
<a
href="http://blog.crowdhmt.com/articles/model_partition"
target="_blank"
style="background-color: rgba(255, 255, 255, 0.8)"
>端自适应模型分割</a
>
</h2>
<p></p>
<!-- <p>支持为用户上传模型定制模型压缩方案,缩减模型体量以满足设定资源</p> -->
<p>支持将一个大型的深度学习模型划分成多个部分,并将这些部分分别部</p>
<p>署到不同的设备上进行计算,从而提高深度学习模型的性能,并降低运</p>
<p>行成本</p>
</div>
</row>
</div>
</div>
</template>
<script>
import InforCard from '_c/info-card'
import CountTo from '_c/count-to'
import { ChartPie, ChartBar } from '_c/charts'
import Example from './example.vue'
<script scoped>
import { VBTooltip } from "bootstrap-vue";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue/dist/bootstrap-vue.css";
import MyComponent from "./MyComponent.vue";
export default {
name: 'home',
components: {
InforCard,
CountTo,
ChartPie,
ChartBar,
Example
},
data () {
data() {
return {
inforCardData: [
{ title: '新增用户', icon: 'md-person-add', count: 803, color: '#2d8cf0' },
{ title: '累计点击', icon: 'md-locate', count: 232, color: '#19be6b' },
{ title: '新增问答', icon: 'md-help-circle', count: 142, color: '#ff9900' },
{ title: '分享统计', icon: 'md-share', count: 657, color: '#ed3f14' },
{ title: '新增互动', icon: 'md-chatbubbles', count: 12, color: '#E46CBB' },
{ title: '新增页面', icon: 'md-map', count: 14, color: '#9A66E4' }
],
pieData: [
{ value: 335, name: '直接访问' },
{ value: 310, name: '邮件营销' },
{ value: 234, name: '联盟广告' },
{ value: 135, name: '视频广告' },
{ value: 1548, name: '搜索引擎' }
],
barData: {
Mon: 13253,
Tue: 34235,
Wed: 26321,
Thu: 12340,
Fri: 24643,
Sat: 1322,
Sun: 1324
}
}
showDescription: false,
imageDescription: {
firstinfo:
"欢迎来到人机物融合群智计算系统开放平台,为您提供从设备到模型部署的中间件服务",
deviceinfo: "设备资源感知: 对您的智能设备可用资源进行测评",
modelinfo: "模型性能评估: 对您的深度学习模型性能进行评估",
modelcompress:
"模型压缩: 减小模型大小以及减少模型参数数量,从而提高模型的效率和性能",
modelseg:
"模型分割: 将深度学习模型划分成若干子模型,以便在多个设备运行,从而减少计算和存储资源的需求",
},
// backgroundImageUrl: '/images/background.jpeg'
// backgroundImageUrl: "/images/background2.jpg",
backgroundImageUrl: "/images/HMTALL_NEW.png",
// backgroundImageUrl: "/images/background4.png",
};
},
mounted () {
//
}
}
directives: { "b-tooltip": VBTooltip },
components: {
MyComponent,
},
};
</script>
<style lang="less">
.count-style{
font-size: 50px;
<style scoped>
.background-image {
background-size: cover;
/* background-position: center center; scope表示仅在该页面使用style,不会收到其他页面的影响*/
background-repeat: no-repeat;
height: 300vh;
background-attachment: fixed;
opacity: 0.95;
}
#zonglan {
filter: grayscale(0%);
}
.image-container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
justify-content: left;
align-items: center;
height: 140vh;
width: 180vh;
margin: 0 auto;
overflow: hidden; /* 清除浮动 */
}
.image-container .image {
order: 1;
float: left;
width: 500px;
margin-right: 20px;
}
.image-first {
display: flex;
justify-content: right;
width: 80%;
}
.image-container .text {
order: 2;
float: right;
overflow: hidden;
font-weight: bold;
color: rgb(0, 0, 0);
font-size: 20px;
}
.row {
display: flex;
width: 80%;
justify-content: center;
align-items: center;
}
img {
width: 100%;
height: auto;
cursor: pointer;
}
.hover-animation {
transition: transform 0.5s;
}
.hover-animation:hover {
transform: scale(1.1);
}
.small-image {
max-width: 67%;
max-height: 67%;
margin-top: 3em;
margin-bottom: 2em;
}
.geDiagramContainer {
display: flex;
align-items: center;
height: 140vh;
width: 200vh;
justify-content: space-between;
}
.section-header-text-center {
font-weight: bold;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
</style>
......@@ -13,6 +13,7 @@ const resolve = dir => {
// 需要将它改为'/my-app/'
// iview-admin线上演示打包路径: https://file.iviewui.com/admin-dist/
const BASE_URL = process.env.NODE_ENV === 'production'
// ? 'http://taiyi.crowdhmt.com:8122/'
? '/'
: '/'
......@@ -45,6 +46,6 @@ module.exports = {
// // changeOrigin: false,
// // }
// // }
proxy: 'http://127.0.0.1:8000'
// proxy: 'http://47.108.143.39:8123'
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment