Skip to content

Crops for regression task #12

@asadabbas09

Description

@asadabbas09

Thanks, @JonasSchult for sharing your work.

I'm trying to prepare a dataset for a regression task. I'm not sure how to handle crops as I think the following piece of code assigns labels to level 0 and is written for segmentation task?.

Any idea how can I assign regression labels to level 0.

Thanks

In utils/preprocess/crop_training_samples.py

if level == 0 and is_train:
                        pooled_levels = np.zeros(
                            (traces[0].max() + 1, labels.max() + 1), dtype=np.int)
                        for i in range(len(labels)):
                            pooled_levels[traces[0][i]][labels[i]] += 1

                        pooled_levels = np.argmax(pooled_levels, axis=1)
                        block_labels = pooled_levels[filters[-1]]

                    # map from old indices to new ones
                    block_edges[-1] = np.unique(block_edges[-1],
                                                return_inverse=True)[1].reshape(-1, 2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions