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
"'gemini_image_generation' performs either image inpainting given an image and text prompt, or image generation given a prompt. It can be used to edit parts of an image or the entire image according to the prompt given.","gemini_image_generation(prompt: str, image: Optional[numpy.ndarray] = None) -> numpy.ndarray:
410
+
'gemini_image_generation' performs either image inpainting given an image and text prompt, or image generation given a prompt.
411
+
It can be used to edit parts of an image or the entire image according to the prompt given.
412
+
413
+
Parameters:
414
+
prompt (str): A detailed text description guiding what should be generated
415
+
in the image. More detailed and specific prompts typically yield
416
+
better results.
417
+
image (np.ndarray, optional): The source image to be inpainted. The image will serve as
418
+
the base context for the inpainting process.
419
+
420
+
Returns:
421
+
np.ndarray: The generated image(s) as a numpy array in RGB format with values
422
+
ranging from 0 to 255.
423
+
424
+
-------
425
+
Example:
426
+
>>> # Generate inpainting
427
+
>>> result = gemini_image_generation(
428
+
... prompt=""a modern black leather sofa with white pillows"",
'qwen25_vl_images_vqa' is a tool that can answer any questions about arbitrary images including regular images or images of documents or presentations. It can be very useful for document QA or OCR text extraction. It returns text as an answer to the question.,"qwen25_vl_images_vqa(prompt: str, images: List[numpy.ndarray]) -> str:
410
433
'qwen25_vl_images_vqa' is a tool that can answer any questions about arbitrary
411
434
images including regular images or images of documents or presentations. It can be
@@ -439,27 +462,28 @@ desc,doc,name
439
462
-------
440
463
>>> qwen25_vl_video_vqa('Which football player made the goal?', frames)
441
464
'Lionel Messi'",qwen25_vl_video_vqa
442
-
'activity_recognition' is a tool that can recognize activities in a video given a text prompt. It can be used to identify where specific activities or actions happen in a video and returns a list of 0s and 1s to indicate the activity.,"activity_recognition(prompt: str, frames: List[numpy.ndarray], model: str = 'qwen25vl', chunk_length_frames: int = 10) -> List[float]:
443
-
'activity_recognition' is a tool that can recognize activities in a video given a
444
-
text prompt. It can be used to identify where specific activities or actions
445
-
happen in a video and returns a list of 0s and 1s to indicate the activity.
465
+
"'agentic_activity_recognition' is a tool that allows you to detect multiple activities within a video. It can be used to identify when specific activities or actions happen in a video, along with a description of the activity.","agentic_activity_recognition(prompt: str, frames: List[numpy.ndarray], fps: Optional[float] = 5, specificity: str = 'max', with_audio: bool = False) -> List[Dict[str, Any]]:
466
+
'agentic_activity_recognition' is a tool that allows you to detect multiple activities within a video.
467
+
It can be used to identify when specific activities or actions happen in a video, along with a description of the activity.
446
468
447
469
Parameters:
448
-
prompt (str): The event you want to identify, should be phrased as a question,
449
-
for example, ""Did a goal happen?"".
450
-
frames (List[np.ndarray]): The reference frames used for the question
451
-
model (str): The model to use for the inference. Valid values are
452
-
'claude-35', 'gpt-4o', 'qwen2vl'.
453
-
chunk_length_frames (int): length of each chunk in frames
470
+
prompt (str): The prompt for activity recognition. Multiple activieties can be separated by semi-colon.
471
+
frames (List[np.ndarray]): The list of frames corresponding to the video.
472
+
fps (float, optional): The frame rate per second to extract the frames at. Defaults to 5.
473
+
specificity (str, optional): Specificity or precision level for activity recognition - low, medium, high, max. Default is max.
474
+
with_audio (bool, optional): Whether to include audio processing in activity recognition. Set it to false if there is no audio in the video. Default is false.
454
475
455
476
Returns:
456
-
List[float]: A list of floats with a value of 1.0 if the activity is detected in
457
-
the chunk_length_frames of the video.
477
+
List[Dict[str, Any]]: A list of dictionaries containing the start time, end time, location, description, and label for each detected activity.
478
+
The start and end times are in seconds, the location is a string, the description is a string, and the label is an integer.
458
479
459
480
Example
460
481
-------
461
-
>>> activity_recognition('Did a goal happened?', frames)
>>> agentic_activity_recognition('Person gets on bike; Person gets off bike', frames)
483
+
[
484
+
{'start_time': 2, 'end_time': 4, 'location': 'Outdoor area', 'description': 'A person approaches a white bicycle parked in a row. The person then swings their leg over the bike and gets on it.', 'label': 0},
485
+
{'start_time': 10, 'end_time': 13, 'location': 'Outdoor area', 'description': 'A person gets off a white bicycle parked in a row. The person swings their leg over the bike and dismounts.', 'label': 1},
486
+
]",agentic_activity_recognition
463
487
'depth_anything_v2' is a tool that runs depth anything v2 model to generate a depth image from a given RGB image. The returned depth image is monochrome and represents depth values as pixel intensities with pixel values ranging from 0 to 255.,"depth_anything_v2(image: numpy.ndarray) -> numpy.ndarray:
464
488
'depth_anything_v2' is a tool that runs depth anything v2 model to generate a
465
489
depth image from a given RGB image. The returned depth image is monochrome and
"'flux_image_inpainting' performs image inpainting to fill the masked regions, given by mask, in the image, given image based on the text prompt and surrounding image context. It can be used to edit regions of an image according to the prompt given.","flux_image_inpainting(prompt: str, image: numpy.ndarray, mask: numpy.ndarray) -> numpy.ndarray:
518
-
'flux_image_inpainting' performs image inpainting to fill the masked regions,
519
-
given by mask, in the image, given image based on the text prompt and surrounding
520
-
image context. It can be used to edit regions of an image according to the prompt
521
-
given.
522
-
523
-
Parameters:
524
-
prompt (str): A detailed text description guiding what should be generated
525
-
in the masked area. More detailed and specific prompts typically yield
526
-
better results.
527
-
image (np.ndarray): The source image to be inpainted. The image will serve as
528
-
the base context for the inpainting process.
529
-
mask (np.ndarray): A binary mask image with 0's and 1's, where 1 indicates
530
-
areas to be inpainted and 0 indicates areas to be preserved.
531
-
532
-
Returns:
533
-
np.ndarray: The generated image(s) as a numpy array in RGB format with values
534
-
ranging from 0 to 255.
535
-
536
-
-------
537
-
Example:
538
-
>>> # Generate inpainting
539
-
>>> result = flux_image_inpainting(
540
-
... prompt=""a modern black leather sofa with white pillows"",
541
-
... image=image,
542
-
... mask=mask,
543
-
... )
544
-
>>> save_image(result, ""inpainted_room.png"")
545
-
",flux_image_inpainting
546
-
"'gemini_image_generation' performs image inpainting given an image and text prompt. It can be used to edit parts of an image or the entire image according to the prompt given.","gemini_image_generation(prompt: str, image: numpy.ndarray) -> numpy.ndarray:
547
-
'gemini_image_generation' performs image inpainting given an image and text prompt.
548
-
It can be used to edit parts of an image or the entire image according to the prompt given.
549
-
550
-
Parameters:
551
-
prompt (str): A detailed text description guiding what should be generated
552
-
in the image. More detailed and specific prompts typically yield
553
-
better results.
554
-
image (np.ndarray): The source image to be inpainted. The image will serve as
555
-
the base context for the inpainting process.
556
-
557
-
Returns:
558
-
np.ndarray: The generated image(s) as a numpy array in RGB format with values
559
-
ranging from 0 to 255.
560
-
561
-
-------
562
-
Example:
563
-
>>> # Generate inpainting
564
-
>>> result = gemini_image_generation(
565
-
... prompt="a modern black leather sofa with white pillows",
566
-
... image=image,
567
-
... )
568
-
>>> save_image(result,""inpainted_room.png"")
569
-
",gemini_image_generation
570
541
'siglip_classification' is a tool that can classify an image or a cropped detection given a list of input labels or tags. It returns the same list of the input labels along with their probability scores based on image content.,"siglip_classification(image: numpy.ndarray, labels: List[str]) -> Dict[str, Any]:
571
542
'siglip_classification' is a tool that can classify an image or a cropped detection given a list
572
543
of input labels or tags. It returns the same list of the input labels along with
- "video object tracking" - tracking objects in a video.
520
520
- "depth and pose estimation" - estimating the depth or pose of objects in an image.
521
521
- "activity recognition" - identifying time period(s) an event occurs in a video.
522
-
- "inpainting" - filling in masked parts of an image.
522
+
- "image generation" - generating images from a text prompt.
523
523
524
524
Return the category or categories (comma separated) inside tags <category># your categories here</category>. If you are unsure about a task, it is better to include more categories than less.
0 commit comments