ID

class bb_utils.ids.BeesbookID(bee_id)[source]

Bases: object

as_bb_binary()[source]

Return ID in decoder binary representation.

Note:

Bits are in most significant bit first order starting at the 12 o’clock position on the tag in clockwise orientation.

See https://arxiv.org/pdf/1611.01331.pdf Figure 1(a) for a graphical representation.

Returns:
np.array: ID in bb_binary representation
as_bin_9()[source]

Return ID in ‘bin_9’ binary representation.

Note:
Bits are in most significant bit first order starting at the 9 o’clock position on the tag in clockwise orientation.
Returns:
np.array: ID in bb_binary representation
as_dec_12()[source]

Return ID decimal representation called ‘dec_12’ by Maria Sparenberg.

Returns:
int: ID in ‘dec_12’ decimal representation
as_dec_9()[source]

Return ID decimal representation called ‘dec_9’ by Maria Sparenberg.

Note:

In this representation, lower decimal IDs roughly correspond to earlier hatch dates.

This is the same as the ferwar representation.

Returns:
int: ID in ‘dec_9’ decimal representation
as_ferwar()[source]

Return ID decimal representation originally used by Fernando Wario.

Note:

In this representation, lower decimal IDs roughly correspond to earlier hatch dates.

This is the same as the ‘dec_9’ representation.

Returns:
int: ID in ferwar decimal representation
static batch_bb_binary_to_ferwar(ids)[source]

Vectorized conversion of bb_binary IDs to ferwar decimal IDs.

Note:
This function can be used when a large batch of IDs has to be converted. It should be significantly faster than constructing a BeesbookID object and calling as_ferwar() for each ID.
Arguments:
np.array: array of bb_binary IDs with shape [batch_size, 12]
Returns:
np.array: array of decimal IDs in ferwar representation
classmethod from_bb_binary(bee_id)[source]

Initialize ID using bb_binary representation.

Note:

Bits are in most significant bit first order starting at the 12 o’clock position on the tag in clockwise orientation.

See https://arxiv.org/pdf/1611.01331.pdf Figure 1(a) for a graphical representation.

Arguments:
bee_id: ID in bb_binary representation
classmethod from_bin_12(bee_id)[source]

Initialize ID using bin_12 representation.

Note:

Bits are in most significant bit first order starting at the 12 o’clock position on the tag in clockwise orientation.

This is the same as the bb_binary representation.

See https://arxiv.org/pdf/1611.01331.pdf Figure 1(a) for a graphical representation.

Arguments:
bee_id: ID in bin_12 representation
classmethod from_bin_9(bee_id)[source]

Initialize ID using bin_9 representation.

Note:
Bits are in most significant bit first order starting at the 9 o’clock position on the tag in clockwise orientation.
Arguments:
bee_id: ID in bin_9 representation
classmethod from_dec_12(bee_id)[source]

Initialize ID using decimal representation called ‘dec_12’ by Maria Sparenberg.

Arguments:
bee_id: ID in dec_12 representation
classmethod from_dec_12_reverse(bee_id)[source]

Initialize ID using decimal representation used in the tracking ground truth by Jakob Mischek.

Arguments:
bee_id: ID in dec_12_reverse representation
classmethod from_dec_9(bee_id)[source]

Initialize ID using decimal representation called ‘dec_9’ by Maria Sparenberg.

Note:

In this representation, lower decimal IDs roughly correspond to earlier hatch dates.

This is the same as the ‘ferwar’ representation.

Arguments:
bee_id: ID in dec_9 representation
classmethod from_ferwar(bee_id)[source]

Initialize ID using decimal representation originally used by Fernando Wario.

Note:

In this representation, lower decimal IDs roughly correspond to earlier hatch dates.

This is the same as the ‘dec_9’ representation.

Arguments:
bee_id: ID in ferwar representation