Separation

Separation()

The signal that makes one mask into many objects.

One per model, because this is what the network is trained to predict: it sets the width of the head and which losses mean anything against it.

This enum is the vocabulary rather than the field. A specification names a signal inside a block - separation: {name: rim, width: 3} - so that the mechanism’s own settings sit in the mechanism they belong to, and _Separation.signal is what ties a block to its member here. The enum is what the numeric layer takes, because instance_target and decode_instances have to know the signal and must know nothing about the spec; it is also what a weights fingerprint records, since the settings change what the channels were trained towards and not what they are.

hv is deliberately not a member, and that absence is a measurement rather than a gap in the implementation. HoVer-Net’s two distance maps were swept both ways they can be turned into markers, on the ground truth, which is the test pyplatypus#213 set itself: the maps’ own zeros reach an instance average precision of 0.9382 and the published gradient route 0.7995, where a one-pixel erosion of the same truth reaches 0.9807 and plain connected components 0.7583. The better of the two recipes loses to the cheapest marker there is by 0.0425 on perfect inputs, so a trained one cannot win; #213 is closed measured-and-no. Naming the value would promise a mechanism this package measured as absent.

Attributes

Name Description
semantic_from The first channel of the class block, which is where the mask is read from.

Methods

Name Description
head_channels How wide the output has to be for this signal, given what the data names.

head_channels

Separation.head_channels(n_class)

How wide the output has to be for this signal, given what the data names.

Derived, never stated, and that is the whole of this method’s reason to exist. n_class already comes from the data - a model restating it could only disagree with its own masks, which is a mistake this package made once and fixed - and the two new targets add channels of their own: rim adds the third class and flows adds two continuous ones in front of the semantic block. A field saying channels: 4 would be a setting that can lie about the target it was built for, and the shape error it causes surfaces deep inside torch rather than here.

It is also the one line that forced examples/train_instance_flows.py to assemble its model outside Engine and call build_model(spec, n_class=4) by hand.

Separation.RIM.head_channels(2), Separation.FLOWS.head_channels(2) (3, 4)