# tfm.vision.anchor.Anchor

Anchor class for anchor-based object detectors.

`min_level` integer number of minimum level of the output feature pyramid.
`max_level` integer number of maximum level of the output feature pyramid.
`num_scales` integer number representing intermediate scales added on each level. For instances, num_scales=2 adds one additional intermediate anchor scales [2^0, 2^0.5] on each level.
`aspect_ratios` list of float numbers representing the aspect raito anchors added on each level. The number indicates the ratio of width to height. For instances, aspect_ratios=[1.0, 2.0, 0.5] adds three anchors on each scale level.
`anchor_size` float number representing the scale of size of the base anchor to the feature stride 2^level.
`image_size` a list of integer numbers or Tensors representing [height, width] of the input image size.The image_size should be divided by the largest feature stride 2^max_level.

`anchors_per_location`

`multilevel_boxes`

## Methods

### `unpack_labels`

View source

Unpacks an array of labels into multiscales labels.

[]
[]
{"ft_lang_label":"__label__en","ft_lang_prob":0.581513,"math_prob":0.9337104,"size":1222,"snap":"2023-14-2023-23","text_gpt3_token_len":302,"char_repetition_ratio":0.13382594,"word_repetition_ratio":0.03468208,"special_character_ratio":0.23076923,"punctuation_ratio":0.16190477,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9538969,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-10T20:40:19Z\",\"WARC-Record-ID\":\"<urn:uuid:5bf730ed-7740-42e8-b339-febb283943d5>\",\"Content-Length\":\"514902\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:65f0f748-9a88-4fe7-8b69-c49c40c961b6>\",\"WARC-Concurrent-To\":\"<urn:uuid:1fc2a631-84e2-4029-a7c8-581960351c14>\",\"WARC-IP-Address\":\"172.253.115.94\",\"WARC-Target-URI\":\"https://tensorflow.google.cn/api_docs/python/tfm/vision/anchor/Anchor\",\"WARC-Payload-Digest\":\"sha1:HBRHUB5ICNLBZX27BSSA3SHERYWSY7PW\",\"WARC-Block-Digest\":\"sha1:6JCI7GZQAYIDLIQG6LP2NUKUTD7SSR2K\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224646350.59_warc_CC-MAIN-20230610200654-20230610230654-00454.warc.gz\"}"}