update lay vecto 512 ngam
This commit is contained in:
@@ -128,4 +128,28 @@ class ListManagement extends \yii\db\ActiveRecord {
|
||||
return $f;
|
||||
}
|
||||
|
||||
public static function statisticFeatures() {
|
||||
$lists = self::find()->all();
|
||||
$total128 = $total512 = $totalImg = $img = 0;
|
||||
foreach ($lists as $key => $value) {
|
||||
$images = json_decode($value->image, true);
|
||||
if (count($images) > 0)
|
||||
$totalImg++;
|
||||
$img += count($images);
|
||||
foreach ($images as $k => $v) {
|
||||
if (isset($v['features']) && count($v['features']) > 0)
|
||||
$total128++;
|
||||
if (isset($v['features512']) && count($v['features512']) > 0)
|
||||
$total512++;
|
||||
}
|
||||
}
|
||||
return [
|
||||
"total" => count($lists),
|
||||
"totalImg" => $totalImg,
|
||||
"img" => $img,
|
||||
"128" => $total128,
|
||||
"512" => $total512
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user