Skip to content

feat(frontend): add AI overlay media stream widgets (deeplab/coco-ssd)#48

Merged
Junseong0829 merged 5 commits into
feature/47-yhkimfrom
feature/42-jslee
Mar 23, 2026
Merged

feat(frontend): add AI overlay media stream widgets (deeplab/coco-ssd)#48
Junseong0829 merged 5 commits into
feature/47-yhkimfrom
feature/42-jslee

Conversation

@Junseong0829

@Junseong0829 Junseong0829 commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Closes #42

Changes

  • SegmentationMediaWidget 구현

    • deeplab 모델 로딩
    • video + canvas overlay 세그멘테이션 렌더링
    • stream reconnect / resize / fullscreen / unmount cleanup
  • ObjectDetectionMediaWidget 구현

    • coco-ssd 모델 로딩
    • bbox + label overlay 렌더링
    • stream reconnect / resize / fullscreen / unmount cleanup
  • widget descriptor 제약 추가

    • Segmentation: deeplab only
    • ObjectDetection: coco-ssd only
  • CI format check 수정

    • Applied oxfmt to files flagged by npm run fmt:check
    • No functional changes

@Junseong0829 Junseong0829 requested a review from BranKein March 22, 2026 14:22

@BranKein BranKein left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

47-yhkim -> 42-jslee 병합하고 작업하는걸 극구 추천드려요 SettingDialog 사용하는 위젯들 몇개 있으니 (JsonViewWidget, MediaStreamWidget 등) llm 도 잘 수정해줄거에요

animationFrameRef.current = window.requestAnimationFrame(() => {
void runDetection();
});
}, DETECTION_INTERVAL_MS);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 detection interval 값 setting dialog 에서 hz 값 조정할 수 있게 하면 좋을듯?

}

const filteredDetections: Detection[] = predictions
.filter((prediction) => prediction.score > SCORE_THRESHOLD)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거도 조정 가능하게

]}
/>
<MosaicWidget.Body>
{error ? (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MosaicWidget.Root 에 error 필드 있으니 거기로 error 넘기고 삼항연산자 빼주세여 (47-yhkim -> 42-jslee 병합 추천)

import { MosaicWidget } from "@/components/Dashboard/Widgets/WidgetComponents.tsx";
import { useMosaicStore } from "@/hooks/useMosaicStore.ts";

const SEGMENTATION_INTERVAL_MS = 100;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obj detection widget 처럼 이건 setting dialog 에서 설정 가능하도록

]}
/>
<MosaicWidget.Body>
{error ? (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 마찬가지로 Root 에 error 넘기고 삼항연산자 빼주세요

borderRadius: "8px",
}}
/>
<Box

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 박스 없어도 될거같아요

return "media";
}

public validateParams(params: Record<string, any>): string | null {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

47-yhkim 머지해서 가져와보면 WidgetDescriptor 에 generic type 이 생겼을거에요 해당 위젯의 params 타입 선언하고 넘겨주면 validateParams 에서도 params arg 를 해당 타입으로 받을 수 있어요

borderRadius: "8px",
}}
/>
<Box

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 박스 없어도 될 것 같아요!

</Flex>
) : (
<Box position="relative" w="100%" h="100%">
<video

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MediaViewerWidget 보면 flipH, flipV 세팅이 있을거에요 그거도 이 object detection media widget 이랑 segmentation media widget 에서 지원하게 해주세요

@Junseong0829 Junseong0829 merged commit c220d18 into feature/47-yhkim Mar 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants