Skip to content

Possible error on random patch generation method #238

@AhmetCanSolak

Description

@AhmetCanSolak

Upon some discussion with @li-li-github today, we realized behavior of the current random patch generation method might be different than what was desired. We wrote the pseudo-code below as a reference for desired behavior. I will be implementing it to compare with existing implementation and then we can possibly discover opportunities for code optimization.

List[slice_objects] generate_random_patches(
    image:BXYZC,
    adoption_rate,
    patch_size,
    nb_patches_per_image, 
):
    list_of_slice_objects = []

    for b in B:
        patches_per_b = generate_patches_per_b(nb_patches_per_image / adoption_rate)

        sorted_patches = sort_entropies_of_histograms_of_patches_per_b()

        result = filter(sorted_patches, adoption_rate)

        list_of_slice_objects.append(make_slice_object(result))

    response = vstack(list_of_slice_objects)

    return response

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions