Feat: Data Init SQL

This commit is contained in:
김용수 2024-09-25 11:24:57 +09:00
parent 4e3c6e195e
commit 70af0596a8
3 changed files with 88 additions and 2 deletions

View File

@ -16,7 +16,7 @@ public class ProgressCacheRepository {
/**
* 현재 오토레이블링중인지 확인하는 메서드
*/
public boolean predictCheck(final int projectId) {
public boolean predictProgress(final int projectId) {
String key = CacheKey.autoLabelingProgressKey();
Boolean isProgress = redisTemplate.opsForSet().isMember(key, projectId);
return Boolean.TRUE.equals(isProgress);

View File

@ -15,7 +15,7 @@ public class ProgressService {
private final ProgressCacheRepository progressCacheRepository;
public void predictCheck(final int projectId){
if(progressCacheRepository.predictCheck(projectId)){
if(progressCacheRepository.predictProgress(projectId)){
throw new CustomException(ErrorCode.AI_IN_PROGRESS);
}
}

View File

@ -0,0 +1,86 @@
# YOLO8 DEFAULT 모델 삽입
INSERT INTO ai_model(model_id, version, name)
VALUES (1, 0, "yolo8-detection");
# 80개의 라벨 카테고리 삽입
INSERT INTO label_category(model_id, label_category_name, ai_category_id)
VALUES (1, 'person', 0),
(1, 'bicycle', 1),
(1, 'car', 2),
(1, 'motorcycle', 3),
(1, 'airplane', 4),
(1, 'bus', 5),
(1, 'train', 6),
(1, 'truck', 7),
(1, 'boat', 8),
(1, 'traffic light', 9),
(1, 'fire hydrant', 10),
(1, 'stop sign', 11),
(1, 'parking meter', 12),
(1, 'bench', 13),
(1, 'bird', 14),
(1, 'cat', 15),
(1, 'dog', 16),
(1, 'horse', 17),
(1, 'sheep', 18),
(1, 'cow', 19),
(1, 'elephant', 20),
(1, 'bear', 21),
(1, 'zebra', 22),
(1, 'giraffe', 23),
(1, 'backpack', 24),
(1, 'umbrella', 25),
(1, 'handbag', 26),
(1, 'tie', 27),
(1, 'suitcase', 28),
(1, 'frisbee', 29),
(1, 'skis', 30),
(1, 'snowboard', 31),
(1, 'sports ball', 32),
(1, 'kite', 33),
(1, 'baseball bat', 34),
(1, 'baseball glove', 35),
(1, 'skateboard', 36),
(1, 'surfboard', 37),
(1, 'tennis racket', 38),
(1, 'bottle', 39),
(1, 'wine glass', 40),
(1, 'cup', 41),
(1, 'fork', 42),
(1, 'knife', 43),
(1, 'spoon', 44),
(1, 'bowl', 45),
(1, 'banana', 46),
(1, 'apple', 47),
(1, 'sandwich', 48),
(1, 'orange', 49),
(1, 'broccoli', 50),
(1, 'carrot', 51),
(1, 'hot dog', 52),
(1, 'pizza', 53),
(1, 'donut', 54),
(1, 'cake', 55),
(1, 'chair', 56),
(1, 'couch', 57),
(1, 'potted plant', 58),
(1, 'bed', 59),
(1, 'dining table', 60),
(1, 'toilet', 61),
(1, 'tv', 62),
(1, 'laptop', 63),
(1, 'mouse', 64),
(1, 'remote', 65),
(1, 'keyboard', 66),
(1, 'cell phone', 67),
(1, 'microwave', 68),
(1, 'oven', 69),
(1, 'toaster', 70),
(1, 'sink', 71),
(1, 'refrigerator', 72),
(1, 'book', 73),
(1, 'clock', 74),
(1, 'vase', 75),
(1, 'scissors', 76),
(1, 'teddy bear', 77),
(1, 'hair drier', 78),
(1, 'toothbrush', 79);