You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This link's code did not work, I think it might be due to update of label studio and the blog is outdated. However, I modified the code and now it works.
I will post the code I use here:
from label_studio_sdk import Client
import time
# Connect to Label Studio
ls = Client(url='http://localhost:8080', api_key='YOUR_API_KEY')
# Get your project by ID
project = ls.get_project(PROJECT_ID)
# Create an export snapshot with interpolation enabled
export_result = project.export_snapshot_create(
title='Export with Interpolated Keyframes',
interpolate_key_frames = True
)
# Get the export ID
export_id = export_result['id']
# Wait for the export to complete
while True:
export_status = project.export_snapshot_status(export_id)
if export_status.is_completed():
break
elif export_status.is_failed():
raise Exception('Export failed')
else:
time.sleep(5) # Wait for 5 seconds before checking again
# Download the export
export_file_path = project.export_snapshot_download(
export_id, export_type='JSON', path='.'
)
print(f'Exported data saved to {export_file_path}')
The text was updated successfully, but these errors were encountered:
I was trying to export the interpolated key frames using Label Studio SDK api and followed the code given on this page. link: https://labelstud.io/templates/video_object_detector
This link's code did not work, I think it might be due to update of label studio and the blog is outdated. However, I modified the code and now it works.
I will post the code I use here:
The text was updated successfully, but these errors were encountered: