label-studio-ml-backend icon indicating copy to clipboard operation
label-studio-ml-backend copied to clipboard

segment_anything_2_video autodetect toolbar

Open brunoaduarte opened this issue 6 months ago • 2 comments

Is it possible to have the "autodetect toolbar" like in segment_anything_2_image on the segment_anything_2_video model?

I tried it like this

<View>
  <Style>
    .main {
      font-family: Arial, sans-serif;
      background-color: #f5f5f5;
      margin: 0;
      padding: 20px;
    }
    .container {
      display: flex;
      justify-content: space-between;
      margin-bottom: 20px;
    }
    .column {
      flex: 1;
      padding: 10px;
      background-color: #fff;
      border-radius: 5px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      text-align: center;
    }
    .column .title {
      margin: 0;
      color: #333;
    }
    .column .label {
      margin-top: 10px;
      padding: 10px;
      background-color: #f9f9f9;
      border-radius: 3px;
    }
    .image-container {
      width: 100%;
      height: 300px;
      background-color: #ddd;
      border-radius: 5px;
    }
  </Style>
  <View className="main">
    <View className="container">
      <View className="column">
        <View className="title">Choose Label</View>
        <View className="label">
          <BrushLabels name="tag" toName="image">
              <Label value="defect" background="#FFA39E"/>
          </BrushLabels>
        </View>
      </View>
      <View className="column">
        <View className="title">Use Keypoint</View>
        <View className="label">
          <KeyPointLabels name="tag2" toName="image" smart="true">
              <Label value="defect" background="#250dd3"/>
          </KeyPointLabels>
        </View>
      </View>
      <View className="column">
        <View className="title">Use Rectangle</View>
        <View className="label">
          <RectangleLabels name="tag3" toName="image" smart="true">
              <Label value="defect" background="#FFC069"/>
          </RectangleLabels>
        </View>
      </View>
    </View>
    <View className="image-container">
      <Video name="image" value="$video" framerate="25.0"/>
      <VideoRectangle name="box" toName="image" smart="true"/>
    </View>
  </View>
</View>

But it doesn't work

Image

Is only VideoRectangle available for videos? Is there a list of the available tags?

Thanks

brunoaduarte avatar May 02 '25 03:05 brunoaduarte