Skip to content

Memory consumption #5

@hanbangzou

Description

@hanbangzou

Dear Author

Thank you for developing this package. I've successfully used it to process an image of size 2424x2424, but encountered a significant issue where all 32 GB of my system's memory was utilized, preventing me from processing additional images.

Could you please provide any recommendations on how to manage or optimize memory usage for batch processing? Any guidance or solutions would be greatly appreciated.

element_crops = MakeCropsDetectThem(
image=image,
model=model,
segment=True,
shape_x=640,
shape_y=640,
overlap_x=50,
overlap_y=50,
conf=0.5,
iou=0.7,
resize_initial_size=False,
)
result = CombineDetections(element_crops, nms_threshold=0.25, match_metric='IOS')

Final Results:

img=result.image
confidences=result.filtered_confidences
boxes=result.filtered_boxes
masks=result.filtered_masks
classes_ids=result.filtered_classes_id
classes_names=result.filtered_classes_names

visualize_results(
img=result.image,
confidences=result.filtered_confidences,
boxes=result.filtered_boxes,
masks=result.filtered_masks,
show_class=False,fill_mask=True,segment=True,
classes_ids=result.filtered_classes_id
)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestfixed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions