|
|
@@ -172,9 +172,16 @@
|
|
|
<div style="margin-bottom:10px;">
|
|
|
<label for="classSelect">分类:</label>
|
|
|
<select id="classSelect" style="font-size:15px;padding:2px 8px;">
|
|
|
- <option value="0">人</option>
|
|
|
- <option value="1">车</option>
|
|
|
- <option value="2">动物</option>
|
|
|
+ <option value="0">cat</option>
|
|
|
+ <option value="1">chicken</option>
|
|
|
+ <option value="2">cow</option>
|
|
|
+ <option value="3">dog</option>
|
|
|
+ <option value="4">fox</option>
|
|
|
+ <option value="5">goat</option>
|
|
|
+ <option value="6">horse</option>
|
|
|
+ <option value="7">person</option>
|
|
|
+ <option value="8">racoon</option>
|
|
|
+ <option value="9">skunk</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div id="boxes-list"></div>
|
|
|
@@ -208,9 +215,16 @@
|
|
|
|
|
|
// 分类配置:名称和颜色
|
|
|
const classConfig = [
|
|
|
- { index: 0, name: '人', border: '#1890ff' },
|
|
|
- { index: 1, name: '车', border: '#52c41a' },
|
|
|
- { index: 2, name: '动物', border: '#722ed1' }
|
|
|
+ { index: 0, name: 'cat', border: '#e67e22' }, // 橙色
|
|
|
+ { index: 1, name: 'chicken',border: '#f1c40f' }, // 黄色
|
|
|
+ { index: 2, name: 'cow', border: '#95a5a6' }, // 灰色
|
|
|
+ { index: 3, name: 'dog', border: '#2980b9' }, // 蓝色
|
|
|
+ { index: 4, name: 'fox', border: '#d35400' }, // 深橙
|
|
|
+ { index: 5, name: 'goat', border: '#16a085' }, // 青色
|
|
|
+ { index: 6, name: 'horse', border: '#8e44ad' }, // 紫色
|
|
|
+ { index: 7, name: 'person', border: '#e74c3c' }, // 红色
|
|
|
+ { index: 8, name: 'racoon', border: '#34495e' }, // 深蓝灰
|
|
|
+ { index: 9, name: 'skunk', border: '#2c3e50' } // 深灰
|
|
|
];
|
|
|
|
|
|
// 辅助函数:将hex色转为rgba字符串,a为透明度
|
|
|
@@ -385,10 +399,9 @@
|
|
|
let imgUrlArr = [
|
|
|
{
|
|
|
id: 'img1',
|
|
|
- url: 'https://image.cszcyl.cn/2022/image/YfJA8eON3exqppNSQrW5EhE9rGdNS1qwou5dgj3L3651WcDDZEy89Hn1A296TXIx.png',
|
|
|
+ url: 'train/images/1_jpg.rf.5c86eb65dfbf1ec4e2fc4830270f2e16.jpg',
|
|
|
boxes: [
|
|
|
- { x: 100, y: 120, w: 80, h: 60, classId: 0 },
|
|
|
- { x: 300, y: 200, w: 120, h: 90, classId: 0 }
|
|
|
+ { x: 0.67734375, y: 0.5359375, w: 0.6453125, h: 0.88203125, classId: 4 }
|
|
|
]
|
|
|
},
|
|
|
{
|