Skip to content

Identical offset#18

Merged
Pfleiderer-Adrian merged 3 commits into
Pfleiderer-Adrian:mainfrom
weltiluk:identical-offset
May 20, 2026
Merged

Identical offset#18
Pfleiderer-Adrian merged 3 commits into
Pfleiderer-Adrian:mainfrom
weltiluk:identical-offset

Conversation

@weltiluk
Copy link
Copy Markdown
Contributor

No description provided.


anomalies = []
anomalies_roi = []
org_masks = [] if config.multiclass else None
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to return always a mask to generate a consistant data structure. return a mask also on binary use-cases.


anomalies = []
anomalies_roi = []
org_masks = [] if config.multiclass else None
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return binary mask

Comment thread synthesizer/Trainer.py
src_slices = [slice(None)]
dst_slices = [slice(None)]
for shift, size in zip(shifts, x.shape[1:]):
def _maybe_apply_shift(self, value, shifts):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warum maybe? Bitte kurz erklären was die neue Funktion macht.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meines Wissens nach können die values auch z.B. strings sein (also keine torch.Tensor), weil AnomalyDataset auch den filename zurückgeben kann. Auf strings soll kein shift angewendet werden, deswegen braucht man einen check. Außerdem hab ich noch einen check auf die passende Anzahl an Dimensionen (akzeptiert auch ohne Channel Dimension). Man könnte die checks auch alle am Anfang von _apply_shift machen. Ich dachte, dass der Name dann ein bisschen irreführend ist.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passt. wir sollten die transform sache nochmal anpassen. Villeicht sollten wir die Dataaugmentation nochmal neu denken und auslagern, damit wirklich die Data augmentations (normalisierung, transformierung, usw..) nur beim Training haben und nicht plötzlich in der Fusion / in den .npy files. Aber das sind Tasks für einen anderen Pull Request. Vorerst passts.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bitte aus dem pull request rausnehmen. Danke!

This was referenced May 19, 2026
@weltiluk weltiluk force-pushed the identical-offset branch 2 times, most recently from 4ec1e8b to 7e24b1d Compare May 20, 2026 09:34
i = i + 1
i = 0
# save roi of anomaly for matching
for roi_sample in anomalies_roi:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sollten wir hier nicht auch die seg. abspeichern?

Copy link
Copy Markdown
Contributor Author

@weltiluk weltiluk May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich sehe gerade, die Änderungen hab ich im anderen PR (#16) gemacht. Dort werden die Masken auch abgespeichert. Ich mach hier also anomalies_seg (im anderen pr org_mask) wieder raus, dass es nicht doppelt ist.

Copy link
Copy Markdown
Owner

@Pfleiderer-Adrian Pfleiderer-Adrian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

save segmentations after extraction?

@Pfleiderer-Adrian Pfleiderer-Adrian merged commit f277a64 into Pfleiderer-Adrian:main May 20, 2026
@weltiluk weltiluk deleted the identical-offset branch May 21, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants