mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-03 15:06:27 +09:00
feat: auto nsfw detection (#8840)
* feat: auto nsfw detection * ✌️ * Update ja-JP.yml * Update ja-JP.yml * ポルノ判定のしきい値を高めに * エラーハンドリングちゃんとした * Update ja-JP.yml * 感度設定を強化 * refactor * feat: add video support for auto nsfw detection * rename: image -> media * .js * fix: add missing error handling * fix: use valid pathname instead of using filename due to invalid usage * perf(nsfw-detection): decode frames * disable detection of video for some reasons * perf(nsfw-detection): streamify detection process for video * disable disallowUploadWhenPredictedAsPorn option * fix(nsfw-detection): improve reliability * fix(nsfw-detection): use Math.ceil instead of Math.round * perf(nsfw-detection): delete tmp frames after used * fix(nsfw-detection): FSWatcher does not emit ready event * perf(nsfw-detection): skip black frames * refactor: strip exists check * Update package.json * めっちゃ変えた * lint * Update COPYING * オプションで動画解析できるように * Update yarn.lock * Update CHANGELOG.md Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
25
packages/backend/migration/1655393015659-nsfw-detection-4.js
Normal file
25
packages/backend/migration/1655393015659-nsfw-detection-4.js
Normal file
@ -0,0 +1,25 @@
|
||||
export class nsfwDetection41655393015659 {
|
||||
name = 'nsfwDetection41655393015659'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetection"`);
|
||||
await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetection_enum"`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetectionSensitivity"`);
|
||||
await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`);
|
||||
await queryRunner.query(`CREATE TYPE "public"."meta_sensitivemediadetection_enum" AS ENUM('none', 'all', 'local', 'remote')`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveMediaDetection" "public"."meta_sensitivemediadetection_enum" NOT NULL DEFAULT 'none'`);
|
||||
await queryRunner.query(`CREATE TYPE "public"."meta_sensitivemediadetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveMediaDetectionSensitivity" "public"."meta_sensitivemediadetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveMediaDetectionSensitivity"`);
|
||||
await queryRunner.query(`DROP TYPE "public"."meta_sensitivemediadetectionsensitivity_enum"`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveMediaDetection"`);
|
||||
await queryRunner.query(`DROP TYPE "public"."meta_sensitivemediadetection_enum"`);
|
||||
await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetectionSensitivity" "public"."meta_sensitiveimagedetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`);
|
||||
await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetection_enum" AS ENUM('none', 'all', 'local', 'remote')`);
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetection" "public"."meta_sensitiveimagedetection_enum" NOT NULL DEFAULT 'none'`);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user