bb_avg_edge_length_68_euclidean_error¶

menpofit.error.bb_avg_edge_length_68_euclidean_error(shape, gt_shape)[source]

Computes the Euclidean error based on 68 points normalised by the average edge length of the 68-point ground truth shape’s bounding box, i.e.

$\frac{\mathcal{F}(s,s^*)}{\mathcal{N}(s^*)}$

where

$\mathcal{F}(s,s^*) = \frac{1}{68}\sum_{i=1}^{68}\sqrt{(s_{i,x}-s^*_{i,x})^2 + (s_{i,y}-s^*_{i,y})^2}$

where $$s$$ and $$s^*$$ are the final and ground truth shapes, respectively. $$(s_{i,x}, s_{i,y})$$ are the x and y coordinates of the $$i$$’th point of the final shape, $$(s^*_{i,x}, s^*_{i,y})$$ are the x and y coordinates of the $$i$$’th point of the ground truth shape. Finally, $$\mathcal{N}(s^*)$$ is a normalising function that returns the average edge length of the bounding box of the 68-point ground truth shape (bb_avg_edge_length).

Parameters
• shape (menpo.shape.PointCloud) – The input shape (e.g. the final shape of a fitting procedure). It must have 68 points.

• gt_shape (menpo.shape.PointCloud) – The ground truth shape. It must have 68 points.

Returns

normalised_error (float) – The computed Euclidean normalised error.

Raises
• ValueError – Final shape must have 68 points

• ValueError – Ground truth shape must have 68 points
{"ft_lang_label":"__label__en","ft_lang_prob":0.7275333,"math_prob":0.9994935,"size":1266,"snap":"2019-43-2019-47","text_gpt3_token_len":392,"char_repetition_ratio":0.14342314,"word_repetition_ratio":0.16149068,"special_character_ratio":0.3191153,"punctuation_ratio":0.1417004,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999385,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-23T15:21:51Z\",\"WARC-Record-ID\":\"<urn:uuid:87c1e7df-5ea3-4e9f-b559-10ef96c4a1b3>\",\"Content-Length\":\"15324\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:186b1f38-e365-4d22-901c-59a674afb5ca>\",\"WARC-Concurrent-To\":\"<urn:uuid:68bac6a7-c77e-4fca-8df5-7be31f651b98>\",\"WARC-IP-Address\":\"104.208.221.96\",\"WARC-Target-URI\":\"https://menpofit.readthedocs.io/en/stable/api/menpofit/error/bb_avg_edge_length_68_euclidean_error.html\",\"WARC-Payload-Digest\":\"sha1:VSLHRD3ZAIYNT5LV7ASX7LCQWF6RFIB3\",\"WARC-Block-Digest\":\"sha1:2QDER7E3BONUI2Y64PGJ2MTJZWACQJ3T\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570987834649.58_warc_CC-MAIN-20191023150047-20191023173547-00212.warc.gz\"}"}