Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed some bugs #2992

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ paddlex --pipeline open_vocabulary_detection \

```python
from paddlex import create_pipeline
pipeline = create_pipeline(pipeline_name="open_vocabulary_detection")
pipeline = create_pipeline(pipeline="open_vocabulary_detection")
output = pipeline.predict(input="open_vocabulary_detection.jpg", prompt="bus . walking man . rearview mirror .")
for res in output:
res.print()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ paddlex --pipeline open_vocabulary_segmentation \

```python
from paddlex import create_pipeline
pipeline = create_pipeline(pipeline_name="open_vocabulary_segmentation")
pipeline = create_pipeline(pipeline="open_vocabulary_segmentation")
output = pipeline.predict(input="open_vocabulary_segmentation.jpg", prompt_type="box", prompt=[[112.9,118.4,513.8,382.1],[4.6,263.6,92.2,336.6],[592.4,260.9,607.2,294.2]])
for res in output:
res.print()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def process(
dict: A dictionary containing the input path, raw image, class IDs, scores, and label names
for every instance of the batch. Keys include 'input_path', 'input_img', 'class_ids', 'scores', and 'label_names'.
"""
image_paths = batch_data
src_images = self.pre_ops[0](batch_data)
image_paths = batch_data.input_paths
src_images = self.pre_ops[0](batch_data.instances)
datas = src_images
# preprocess
for pre_op in self.pre_ops[1:-1]:
Expand All @@ -117,7 +117,7 @@ def process(

return {
"input_path": image_paths,
"input_img": src_images,
"input_img": [img[..., ::-1] for img in src_images],
"boxes": boxes,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def process(self, batch_data: List[Any], prompts: Dict[str, Any]):
dict: A dictionary containing the input path, raw image, class IDs, scores, and label names
for every instance of the batch. Keys include 'input_path', 'input_img', 'class_ids', 'scores', and 'label_names'.
"""
image_paths = batch_data
src_images = self.pre_ops[0](batch_data)
image_paths = batch_data.input_paths
src_images = self.pre_ops[0](batch_data.instances)
datas = src_images
# preprocess
for pre_op in self.pre_ops[1:-1]:
Expand Down