Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6eebb8a
Add tests/integration folder
yashsuman15 Sep 14, 2025
0e32505
-removed api keys, secrets, client id
yashsuman15 Sep 16, 2025
90572d8
- created SDKPython subdir in labellerr
yashsuman15 Oct 2, 2025
9178b37
added ffmpeg sampling frames method
yashsuman15 Oct 2, 2025
03dfa0a
added SSIM based video keyframe sampling method
yashsuman15 Oct 3, 2025
e6e6bba
- added gemini method for video sampling
yashsuman15 Oct 3, 2025
6cc7e52
Review comments
ximihoque Oct 4, 2025
18fb31b
fixed scripts
yashsuman15 Oct 4, 2025
a6009c6
Merge branch 'main' of https://github.com/yashsuman15/SDKPython
yashsuman15 Oct 4, 2025
ac7bc84
merging with main
yashsuman15 Oct 4, 2025
2ee6ec9
Merge branch 'main' into feature/LABIMP-7672
yashsuman15 Oct 4, 2025
868101f
files restructiing
yashsuman15 Oct 5, 2025
973cf02
Merge branch 'feature/LABIMP-7672' of https://github.com/yashsuman15/…
yashsuman15 Oct 5, 2025
bd1da4c
updated the scripts based on comments
yashsuman15 Oct 6, 2025
5addbaa
added threading to frames downloading
yashsuman15 Oct 6, 2025
bad6f53
Revert "added threading to frames downloading"
yashsuman15 Oct 6, 2025
dac6ffb
minor changes in client_utils
yashsuman15 Oct 6, 2025
3fb23e9
remove the file_id argument, only video_path is needed
yashsuman15 Oct 8, 2025
5a16b51
added the cookbook
yashsuman15 Oct 8, 2025
3758845
minor update
yashsuman15 Oct 8, 2025
194cb26
minor chages to pyscene storing pattern
yashsuman15 Oct 8, 2025
6d118b6
added video dataset class, minor update video sampling algo
yashsuman15 Oct 9, 2025
11b33f8
minor update
yashsuman15 Oct 9, 2025
e58ba82
Refactor video processing methods
yashsuman15 Oct 9, 2025
c838288
Added SDK workflow cookbook
yashsuman15 Oct 10, 2025
67f864e
minor changes to SDK
yashsuman15 Oct 10, 2025
590cd82
Refactor dataset handling: Rename LabellerrVideoDataset to LabellerrD…
yashsuman15 Oct 14, 2025
8330f7b
Resolved conflicts
ximihoque Oct 14, 2025
efb7bbd
update SDK notebook for Kaggle integration and project creation steps
yashsuman15 Oct 23, 2025
9477710
fixed the lint issue
yashsuman15 Oct 26, 2025
61e9ab4
Merge branch 'main' into feature/LABIMP-7672
yashsuman15 Oct 26, 2025
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
Expand All @@ -11,25 +11,25 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/psf/black
rev: 24.8.0
rev: 25.9.0
hooks:
- id: black
args: ["--line-length=88"]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
args: ["--profile=black", "--line-length=88"]

- repo: https://github.com/pycqa/flake8
rev: 7.1.1
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies: []

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.18.2
hooks:
- id: mypy
args: ["--config=pyproject.toml"]
Expand Down
3 changes: 1 addition & 2 deletions labellerr/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"""This is to be removed, should be in constants.py
"""
"""This is to be removed, should be in constants.py"""

cdn_server_address = "cdn-951134552678.us-central1.run.app:443"
3 changes: 1 addition & 2 deletions labellerr/core/autolabel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
"""Inference core wrappers go here.
"""
"""Inference core wrappers go here."""
10 changes: 4 additions & 6 deletions labellerr/core/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""This module will contain all CRUD for datasets. Example, create, list datasets, get dataset, delete dataset, update dataset, etc.
"""
# from labellerr.core.datasets.base import LabellerrDataset
"""This module will contain all CRUD for datasets. Example, create, list datasets, get dataset, delete dataset, update dataset, etc."""

# __all__ = [
# 'LabellerrDataset'
# ]
from labellerr.core.datasets.base import LabellerrDataset

__all__ = ["LabellerrDataset"]
2 changes: 1 addition & 1 deletion labellerr/core/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,4 @@ def download(self):
# results = dataset.download()

# # Print summary
# pprint.pprint(results)
# pprint.pprint(results)
2 changes: 1 addition & 1 deletion labellerr/core/files/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
'LabellerrImageFile',
'LabellerrVideoFile',
'LabellerrFileMeta'
]
]
2 changes: 1 addition & 1 deletion labellerr/core/files/image_file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from labellerr.core.files.base import LabellerrFile

class LabellerrImageFile(LabellerrFile):
pass
pass
2 changes: 1 addition & 1 deletion labellerr/core/files/video_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,4 @@ def download_create_video_auto_cleanup(self, output_folder: str = "./Labellerr_d
raise LabellerrError(f"Failed in video processing: {str(e)}")


LabellerrFileMeta.register('video', LabellerrVideoFile)
LabellerrFileMeta.register('video', LabellerrVideoFile)
3 changes: 1 addition & 2 deletions labellerr/services/autolabel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
"""This module will have API handling for triggering SAM, SAM2 jobs.
"""
"""This module will have API handling for triggering SAM, SAM2 jobs."""
34 changes: 17 additions & 17 deletions labellerr/services/labellerr_files/client_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,23 +383,23 @@ def fetch_files(self, limit: int | None = None, page_size: int = 10):
raise LabellerrError(f"Failed to fetch dataset files: {str(e)}")

# Example usage
if __name__ == "__main__":
# if __name__ == "__main__":

api_key = "66f4d8.9f402742f58a89568f5bcc0f86"
api_secret = "1e2478b930d4a842a526beb585e60d2a9ee6a6f1e3aa89cb3c8ead751f418215"
client_id = "14078"
dataset_id = "16257fd6-b91b-4d00-a680-9ece9f3f241c"
project_id = "gabrila_artificial_duck_74237"
file_id = "c44f38f6-0186-436f-8c2d-ffb50a539c76"
# api_key = ""
# api_secret = ""
# client_id = "14078"
# dataset_id = "16257fd6-b91b-4d00-a680-9ece9f3f241c"
# project_id = "gabrila_artificial_duck_74237"
# file_id = "c44f38f6-0186-436f-8c2d-ffb50a539c76"

client = LabellerrClient(api_key=api_key, api_secret=api_secret, client_id=client_id)
# client = LabellerrClient(api_key=api_key, api_secret=api_secret, client_id=client_id)

lb_file = LabellerrFile(
client=client,
file_id=file_id,
project_id=project_id,
dataset_id=dataset_id
)
# lb_file = LabellerrFile(
# client=client,
# file_id=file_id,
# project_id=project_id,
# dataset_id=dataset_id
# )


# print(f"File type: {type(lb_file).__name__}")
Expand All @@ -417,8 +417,8 @@ def fetch_files(self, limit: int | None = None, page_size: int = 10):
# frames_path = f"./output/{file_id}"
# lb_file.create_video(frames_folder=frames_path, output_file="final_video.mp4", framerate=30)

lb_dataset = LabellerrVideoDataset(client=client, dataset_id=dataset_id, project_id=project_id)
lb_dataset.fetch_files()
# lb_dataset = LabellerrVideoDataset(client=client, dataset_id=dataset_id, project_id=project_id)
# lb_dataset.fetch_files()
# print(f"Fetched {len(video_files)} video files from dataset {dataset_id}")
# print(video_files)


2 changes: 1 addition & 1 deletion labellerr/services/video_sampling/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ def _save_json_mapping(self, result: DetectionResult, output_folder: str, file_i

# Get singleton instance
detector = FFMPEGSceneDetect()
result = detector.detect_and_extract(video_path)
result = detector.detect_and_extract(video_path)
2 changes: 1 addition & 1 deletion labellerr/services/video_sampling/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ def _save_json_mapping(


except Exception as e:
print(f"Error: {e}")
print(f"Error: {e}")
2 changes: 1 addition & 1 deletion labellerr/services/video_sampling/pyscene_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ def _save_json_mapping(self, result: DetectionResult, output_folder: str, file_i
# video_path = r"D:\professional\LABELLERR\Task\Repos\SDKPython\labellerr\notebooks\c44f38f6-0186-436f-8c2d-ffb50a539c76.mp4"

# detector = PySceneDetect()
# result = detector.detect_and_extract(video_path)
# result = detector.detect_and_extract(video_path)
2 changes: 1 addition & 1 deletion labellerr/services/video_sampling/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scenedetect
google-cloud-videointelligence
scikit-image
scikit-image
2 changes: 1 addition & 1 deletion labellerr/services/video_sampling/ssim.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,4 @@ def _save_json_mapping(

print(f"\nDetection complete!")
print(f"Total frames extracted: {len(result.selected_frames)}")
print(f"Output folder: {result.output_folder}")
print(f"Output folder: {result.output_folder}")
Loading