Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release test #534

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/frontend/src/components/Navigate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Homepage = () => {
</Button>
</Popover>
{window.IS_ONLINE && (
<a data-wiz="local-deploy-top-right" href="https://opendatalab.github.io/labelU/#/guide/install">
<a data-wiz="local-deploy-top-right" href="https://opendatalab.github.io/labelU/guide/install">
<Button type="link" style={{ color: 'rgba(0, 0, 0, 0.85)' }} icon={<Icon component={LocalDeploy} />}>
本地部署
</Button>
Expand All @@ -72,7 +72,7 @@ const Homepage = () => {
type="link"
data-wiz="documentation"
icon={<BellOutlined />}
href="https://opendatalab.github.io/labelU/#/"
href="https://opendatalab.github.io/labelU/guide/introduction"
style={{ color: 'rgba(0, 0, 0, 0.85)' }}
target="_blank"
rel="noreferrer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"properties": {
"toolName": {
"type": "string",
"const": "frameTool"
"const": "audioFrameTool"
},
"result": {
"type": "array",
Expand Down Expand Up @@ -190,7 +190,7 @@
"properties": {
"toolName": {
"type": "string",
"const": "segmentTool"
"const": "audioSegmentTool"
},
"result": {
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import { TaskCreationContext } from '../../taskCreation.context';
import { Bar, ButtonWrapper, Header, Left, Right, Spot, UploadArea, Wrapper } from './style';
import imageSchema from './imagePreAnnotationJsonl.schema.json';
import imageJsonSchema from './imagePreAnnotationJson.schema.json';
import audioJsonSchema from './audioPreAnnotationJson.schema.json';
import videoJsonSchema from './videoPreAnnotationJson.schema.json';
import audioSchema from './audioPreAnnotationJsonl.schema.json';
import videoSchema from './videoPreAnnotationJsonl.schema.json';
import { isCorrectFiles, isPreAnnotationFile, normalizeFiles, readFile, UploadStatus } from './utils';
Expand All @@ -47,8 +49,8 @@ const jsonlMapping = {

const jsonMapping = {
[MediaType.IMAGE]: imageJsonSchema,
[MediaType.VIDEO]: videoSchema,
[MediaType.AUDIO]: audioSchema,
[MediaType.VIDEO]: videoJsonSchema,
[MediaType.AUDIO]: audioJsonSchema,
};

export interface QueuedFile {
Expand Down Expand Up @@ -431,7 +433,7 @@ const InputData = () => {
支持上传 jsonl 格式的预标注文件或LabelU 导出 json 标注文件,参考{' '}
<a
target="_blank"
href="https://opendatalab.github.io/labelU/#/schema/pre-annotation/image"
href="https://opendatalab.github.io/labelU/schema/pre-annotation/json"
rel="noreferrer"
>
示例
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"properties": {
"toolName": {
"type": "string",
"const": "frameTool"
"const": "videoFrameTool"
},
"result": {
"type": "array",
Expand Down Expand Up @@ -190,7 +190,7 @@
"properties": {
"toolName": {
"type": "string",
"const": "segmentTool"
"const": "videoSegmentTool"
},
"result": {
"type": "array",
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/pages/tasks.[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const Samples = () => {
<>
数据导入时上传 labelu 导出的 json标注文件或组装成 jsonl 文件 即可导入预标注,预标注格式参考{' '}
<a
href="https://opendatalab.github.io/labelU/#/schema/pre-annotation/image"
href="https://opendatalab.github.io/labelU/schema/pre-annotation/json"
target="_blank"
rel="noreferrer"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/pages/tasks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const TaskList = () => {
当前为体验版,每日凌晨数据将自动清空,请及时备份重要数据。如需完整使用,建议
<a
data-wiz="local-deploy-alert"
href="https://opendatalab.github.io/labelU/#/guide/install"
href="https://opendatalab.github.io/labelU/guide/install"
target="_blank"
rel="noreferrer"
>
Expand Down
12 changes: 8 additions & 4 deletions packages/audio-react/src/Audio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export const AudioAnnotator = forwardRef<HTMLDivElement, AudioAnnotatorProps>(fu
ref,
) {
const playerRef = useRef<WaveSurfer>(null);
const editTypeRef = useRef<AudioAnnotationType | undefined>(editingType);
const annotatorRef = useRef<MediaAnnotatorRef>(null);
const [duration, setDuration] = useState(0);
const controllerRef = useRef<PlayerControllerRef>(null);
Expand Down Expand Up @@ -293,12 +294,15 @@ export const AudioAnnotator = forwardRef<HTMLDivElement, AudioAnnotatorProps>(fu
useImperativeHandle(propsAnnotatorRef, () => annotatorRef.current!, [annotatorRef, duration]);

useEffect(() => {
setSelectedAnnotation(propsSelectedAnnotation);
}, [propsSelectedAnnotation]);
if (editTypeRef.current !== editingType) {
editTypeRef.current = editingType;
setSelectedAnnotation(undefined);
}
}, [editingType]);

useEffect(() => {
setSelectedAnnotation(undefined);
}, [editingType]);
setSelectedAnnotation(propsSelectedAnnotation);
}, [propsSelectedAnnotation]);

// 选中时间点后,更新在时间区间内的标注
useEffect(() => {
Expand Down
16 changes: 11 additions & 5 deletions packages/video-react/src/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,25 @@ const VideoAnnotator = forwardRef<HTMLDivElement | null, VideoProps>(function Fo
ref,
) {
const [duration, setDuration] = useState(0);
const [selectedAnnotation, setSelectedAnnotation] = useState<VideoAnnotationInUI | undefined>();
const [selectedAnnotation, setSelectedAnnotation] = useState<VideoAnnotationInUI | undefined>(
propsSelectedAnnotation,
);
const editTypeRef = useRef<VideoAnnotationType | undefined>(editingType);
const playerRef = useRef<any>(null);
const annotatorRef = useRef<MediaAnnotatorRef | null>(null);
const isPlayingRef = useRef<boolean>(false);
const [playingAnnotationIds, setPlayingAnnotationIds] = useState<string[]>([]);

useEffect(() => {
setSelectedAnnotation(propsSelectedAnnotation);
}, [propsSelectedAnnotation]);
if (editTypeRef.current !== editingType) {
editTypeRef.current = editingType;
setSelectedAnnotation(undefined);
}
}, [editingType]);

useEffect(() => {
setSelectedAnnotation(undefined);
}, [editingType]);
setSelectedAnnotation(propsSelectedAnnotation);
}, [propsSelectedAnnotation]);

useEffect(() => {
if (playerRef.current) {
Expand Down
Loading