返回 ViMax
frame.py
根目录 / interfaces / frame.py
1 from pydantic import BaseModel, Field
2 from typing import List, Optional, Union, Dict, Tuple, Literal
3
4
5 class Frame(BaseModel):
6 shot_idx: int = Field(
7 description="The index of the shot in the sequence, starting from 0."
8 )
9
10 frame_type: Literal["first", "last"] = Field(
11 description="The type of the frame, 'first' for the first frame of the shot, 'last' for the last frame of the shot."
12 )
13
14 cam_idx: int = Field(
15 description="The index of the camera used for this frame, starting from 0."
16 )
17
18 vis_char_idxs: List[int] = Field(
19 description="A list of indices of characters that are visible in this frame, corresponding to the character list provided in the input."
20 )
21
21 lines PYTHON