# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # 5 Shot

# ### 80 classes

# Detection

mAP = [24.9, 25.0, 24.9, 25.0, 24.9]
mAP50 = [40.5, 40.5, 40.4, 40.6, 40.3]
mAP75 = [26.6, 26.8, 26.6, 26.7, 26.7]
mAP_small = [13.1, 13.8, 12.7, 13.7, 13.4]
mAP_medium = [25.2, 24.9, 24.9, 24.9, 25.0]
mAP_large = [35.4, 36.1, 36.1, 35.8, 36.1]
AR1 = [21.9, 21.8, 22.0, 21.7, 21.8]
AR10 = [40.1, 40.3, 40.1, 40.0, 40.0]
AR100 = [41.7, 42.0, 41.7, 41.7, 41.7]
AR_small = [23.3, 24.3, 23.9, 24.1, 24.0]
AR_medium = [44.4, 44.4, 44.2, 44.2, 44.1]
AR_large = [58.8, 59.4, 59.2, 59.0, 59.2]

# Segmentation

mAP = [22.0, 22.0, 22.1, 22.1, 21.9]
mAP50 = [37.9, 37.6, 38.0, 38.0, 37.7]
mAP75 = [22.8, 22.8, 23.0, 23.0, 22.7]
mAP_small = [11.0, 11.9, 10.7, 11.8, 11.5]
mAP_medium = [22.3, 22.1, 22.3, 22.1, 22.3]
mAP_large = [32.1, 32.4, 32.6, 32.4, 32.3]
AR1 = [19.7, 19.6, 19.9, 19.6, 19.7]
AR10 = [35.7, 35.8, 35.8, 35.8, 35.7]
AR100 = [37.2, 37.2, 37.2, 37.2, 37.2]
AR_small = [20.1, 21.3, 21.1, 21.0, 21.3]
AR_medium = [39.7, 39.5, 39.5, 39.5, 39.5]
AR_large = [52.4, 52.3, 52.7, 52.8, 52.6]

# ### S1

# #### background

# Detection

mAP = [25.7, 25.7, 25.6, 25.6, 25.7]
mAP50 = [42.5, 42.4, 42.3, 42.2, 42.4]
mAP75 = [27.2, 27.1, 27.1, 26.9, 27.4]
mAP_small = [12.6, 12.5, 13.1, 12.5, 12.5]
mAP_medium = [25.9, 25.6, 25.5, 25.3, 25.7]
mAP_large = [36.0, 36.1, 36.1, 36.3, 36.4]
AR1 = [22.1, 22.1, 22.1, 22.1, 22.0]
AR10 = [40.6, 40.6, 40.7, 40.5, 40.4]
AR100 = [42.5, 42.4, 42.5, 42.3, 42.2]
AR_small = [24.3, 24.2, 24.7, 24.2, 24.3]
AR_medium = [45.3, 45.3, 45.2, 44.8, 45.0]
AR_large = [59.4, 59.2, 59.3, 59.4, 59.4]

# Segmentation

mAP = [22.8, 22.7, 22.6, 22.8, 22.8]
mAP50 = [39.8, 39.6, 39.6, 39.7, 39.8]
mAP75 = [23.2, 23.1, 22.8, 23.1, 23.3]
mAP_small = [10.4, 10.1, 10.8, 10.2, 10.2]
mAP_medium = [23.2, 23.0, 22.9, 22.8, 23.1]
mAP_large = [32.9, 33.0, 32.9, 33.2, 33.2]
AR1 = [20.3, 20.2, 20.2, 20.3, 20.1]
AR10 = [36.3, 36.1, 36.1, 36.1, 36.0]
AR100 = [37.8, 37.6, 37.6, 37.7, 37.5]
AR_small = [20.9, 20.5, 21.0, 20.8, 20.6]
AR_medium = [40.8, 40.9, 40.7, 40.6, 40.6]
AR_large = [53.4, 53.0, 52.9, 53.3, 53.4]

# #### one-shot

# Detection

mAP = [9.4, 9.4, 9.5, 9.4, 9.3]
mAP50 = [16.9, 16.7, 16.8, 16.8, 16.6]
mAP75 = [9.7, 9.6, 9.7, 9.7, 9.6]
mAP_small = [5.4, 5.4, 5.9, 6.2, 5.3]
mAP_medium = [9.5, 9.2, 9.1, 9.5, 9.0]
mAP_large = [14.4, 14.8, 14.9, 14.2, 14.9]
AR1 = [11.2, 11.0, 10.8, 11.0, 10.9]
AR10 = [28.0, 28.2, 28.2, 28.0, 28.2]
AR100 = [29.4, 29.4, 29.4, 29.2, 29.6]
AR_small = [17.9, 17.5, 14.5, 14.6, 14.4]
AR_medium = [32.4, 31.7, 32.0, 31.4, 32.0]
AR_large = [45.8, 45.7, 45.8, 45.1, 46.6]

# Segmentation

mAP = [7.3, 7.4, 7.5, 7.4, 7.4]
mAP50 = [14.7, 14.7, 14.9, 15.0, 14.8]
mAP75 = [6.5, 6.7, 7.0, 6.5, 6.8]
mAP_small = [4.1, 4.2, 4.4, 4.7, 4.2]
mAP_medium = [7.1, 7.1, 7.2, 7.6, 7.0]
mAP_large = [11.9, 12.2, 12.4, 11.9, 12.4]
AR1 = [9.1, 9.2, 9.0, 9.3, 9.2]
AR10 = [23.3, 23.8, 23.8, 23.7, 23.7]
AR100 = [24.5, 24.7, 24.8, 24.7, 24.7]
AR_small = [15.1, 15.3, 11.5, 11.8, 11.7]
AR_medium = [26.8, 26.6, 27.2, 26.5, 26.7]
AR_large = [39.3, 38.8, 39.4, 39.2, 39.8]

# ### S2

# #### background

# Detection

mAP = [24.2, 24.4, 24.3, 24.4, 24.3]
mAP50 = [40.3, 40.7, 40.5, 40.6, 40.5]
mAP75 = [26.0, 26.2, 26.2, 26.0, 26.1]
mAP_small = [12.5, 12.5, 13.1, 13.2, 12.7]
mAP_medium = [25.0, 25.4, 25.2, 25.1, 25.0]
mAP_large = [35.0, 35.3, 35.1, 35.6, 35.7]
AR1 = [21.3, 21.4, 21.4, 21.4, 21.4]
AR10 = [39.7, 39.6, 39.8, 39.7, 39.7]
AR100 = [41.3, 41.3, 41.5, 41.4, 41.2]
AR_small = [24.2, 24.0, 24.3, 24.3, 23.9]
AR_medium = [44.2, 44.4, 44.4, 44.1, 44.1]
AR_large = [59.7, 59.8, 59.9, 60.1, 59.8]

# Segmentation

mAP = [21.0, 21.1, 21.0, 21.0, 21.1]
mAP50 = [37.1, 37.4, 37.3, 37.4, 37.2]
mAP75 = [21.6, 21.9, 21.6, 21.4, 21.8]
mAP_small = [10.2, 10.2, 10.8, 10.8, 10.3]
mAP_medium = [21.6, 21.9, 21.7, 21.7, 21.7]
mAP_large = [30.9, 31.2, 31.0, 31.2, 31.7]
AR1 = [19.1, 19.2, 19.2, 19.1, 19.3]
AR10 = [34.9, 34.9, 35.0, 34.9, 34.9]
AR100 = [36.2, 36.3, 36.4, 36.2, 36.2]
AR_small = [20.8, 20.6, 20.7, 20.9, 20.5]
AR_medium = [38.6, 38.9, 38.8, 38.7, 38.7]
AR_large = [52.8, 53.0, 52.6, 53.0, 53.1]

# #### one-shot

# Detection

mAP = [11.6, 11.8, 11.6, 11.7, 11.7]
mAP50 = [20.0, 20.0, 19.9, 19.9, 20.0]
mAP75 = [12.1, 12.3, 11.9, 12.3, 11.8]
mAP_small = [6.3, 6.1, 6.2, 6.4, 6.6]
mAP_medium = [9.5, 9.9, 9.3, 9.9, 9.9]
mAP_large = [19.3, 19.9, 18.9, 19.5, 18.9]
AR1 = [13.6, 13.3, 13.3, 13.1, 13.3]
AR10 = [29.3, 29.1, 29.0, 29.1, 29.2]
AR100 = [30.4, 30.1, 30.2, 30.3, 30.4]
AR_small = [15.6, 14.6, 14.9, 15.2, 15.4]
AR_medium = [30.6, 30.6, 30.7, 30.7, 30.9]
AR_large = [48.0, 48.1, 48.2, 48.1, 49.0]

# Segmentation

mAP = [10.0, 10.3, 10.2, 10.3, 10.2]
mAP50 = [17.7, 18.1, 18.0, 18.2, 18.1]
mAP75 = [10.3, 10.5, 10.5, 10.6, 10.5]
mAP_small = [5.2, 4.9, 5.1, 5.2, 5.3]
mAP_medium = [8.5, 8.6, 8.3, 8.7, 8.7]
mAP_large = [16.9, 17.9, 16.8, 17.4, 16.9]
AR1 = [12.0, 11.9, 12.0, 11.9, 12.0]
AR10 = [26.0, 25.9, 26.0, 25.8, 26.1]
AR100 = [27.1, 26.8, 27.0, 27.0, 27.2]
AR_small = [12.7, 12.0, 12.5, 12.7, 12.7]
AR_medium = [27.8, 27.5, 27.6, 27.7, 27.9]
AR_large = [43.9, 44.0, 44.0, 43.9, 44.6]

# ### S3

# #### background

# Detection

mAP = [25.8, 25.8, 25.8, 25.8, 25.9]
mAP50 = [41.4, 41.5, 41.6, 41.5, 41.7]
mAP75 = [28.0, 27.9, 27.9, 28.0, 28.0]
mAP_small = [12.8, 12.7, 12.7, 12.7, 12.6]
mAP_medium = [24.9, 25.2, 25.2, 25.3, 25.2]
mAP_large = [38.0, 38.3, 38.2, 38.2, 38.4]
AR1 = [22.5, 22.4, 22.3, 22.4, 22.6]
AR10 = [41.2, 41.0, 41.1, 40.9, 41.0]
AR100 = [42.8, 42.8, 42.8, 42.6, 42.7]
AR_small = [23.4, 23.8, 23.4, 23.6, 23.3]
AR_medium = [45.1, 45.3, 45.1, 45.0, 45.2]
AR_large = [61.4, 61.6, 61.6, 61.5, 61.2]

# Segmentation

mAP = [22.3, 22.3, 22.4, 22.4, 22.4]
mAP50 = [38.5, 38.7, 38.8, 38.6, 38.9]
mAP75 = [22.7, 22.8, 22.6, 23.0, 22.8]
mAP_small = [10.4, 10.2, 10.3, 10.2, 10.2]
mAP_medium = [21.6, 21.9, 22.0, 22.0, 21.9]
mAP_large = [34.0, 34.4, 34.0, 34.3, 34.4]
AR1 = [20.2, 20.4, 20.1, 20.2, 20.4]
AR10 = [36.5, 36.5, 36.5, 36.4, 36.4]
AR100 = [37.8, 37.9, 37.9, 37.8, 37.8]
AR_small = [19.8, 19.8, 19.7, 19.9, 19.7]
AR_medium = [40.1, 40.2, 40.4, 40.1, 40.2]
AR_large = [56.1, 56.3, 56.3, 56.5, 56.2]

# #### one-shot

# Detection

mAP = [10.0, 9.7, 9.8, 9.8, 9.5]
mAP50 = [18.5, 18.2, 18.3, 18.4, 17.5]
mAP75 = [10.0, 9.2, 9.4, 9.7, 9.1]
mAP_small = [6.5, 6.6, 6.9, 6.9, 6.7]
mAP_medium = [9.5, 9.6, 8.8, 9.4, 8.7]
mAP_large = [18.1, 17.5, 17.8, 17.2, 17.1]
AR1 = [9.7, 9.8, 9.6, 9.5, 9.3]
AR10 = [25.0, 25.1, 25.0, 25.0, 24.8]
AR100 = [26.0, 26.0, 26.0, 26.1, 25.8]
AR_small = [16.0, 16.3, 16.5, 16.4, 16.1]
AR_medium = [26.3, 26.6, 26.2, 26.8, 26.1]
AR_large = [42.6, 43.3, 42.3, 42.1, 41.5]

# Segmentation

mAP = [9.1, 9.0, 9.0, 9.0, 8.7]
mAP50 = [17.5, 17.3, 17.5, 17.6, 17.1]
mAP75 = [8.7, 8.6, 8.5, 8.5, 8.3]
mAP_small = [5.4, 5.4, 5.7, 5.7, 5.6]
mAP_medium = [8.5, 8.9, 7.9, 8.3, 7.6]
mAP_large = [17.1, 16.4, 16.7, 16.4, 16.6]
AR1 = [9.5, 9.6, 9.4, 9.3, 9.0]
AR10 = [23.1, 23.2, 23.0, 23.0, 22.8]
AR100 = [24.0, 24.0, 23.9, 24.0, 23.6]
AR_small = [14.6, 14.4, 14.8, 14.4, 14.4]
AR_medium = [24.5, 24.5, 24.4, 24.6, 23.5]
AR_large = [38.4, 38.7, 38.4, 38.4, 37.8]

# ### S4

# #### background

# Detection

mAP = [25.1, 25.0, 25.1, 25.1, 25.0]
mAP50 = [40.8, 40.8, 41.1, 41.0, 40.8]
mAP75 = [26.8, 26.5, 26.8, 26.9, 26.8]
mAP_small = [13.2, 12.4, 12.6, 13.5, 12.7]
mAP_medium = [23.8, 23.9, 24.0, 23.8, 23.7]
mAP_large = [36.7, 36.2, 36.0, 36.2, 36.5]
AR1 = [21.3, 21.6, 21.6, 21.4, 21.5]
AR10 = [40.2, 40.3, 40.3, 40.3, 40.2]
AR100 = [42.3, 42.2, 42.4, 42.3, 42.3]
AR_small = [24.8, 23.9, 25.1, 24.5, 25.1]
AR_medium = [44.4, 44.5, 44.7, 44.3, 44.4]
AR_large = [59.6, 58.8, 58.9, 59.0, 59.1]

# Segmentation

mAP = [22.1, 22.0, 22.1, 22.2, 22.0]
mAP50 = [37.9, 37.9, 38.0, 38.2, 37.7]
mAP75 = [23.3, 23.1, 23.2, 23.1, 23.1]
mAP_small = [10.9, 10.1, 10.3, 11.2, 10.3]
mAP_medium = [20.8, 20.9, 20.9, 20.8, 20.8]
mAP_large = [33.3, 33.0, 32.7, 32.8, 32.9]
AR1 = [19.3, 19.6, 19.7, 19.4, 19.6]
AR10 = [35.8, 35.9, 35.9, 35.9, 35.9]
AR100 = [37.6, 37.5, 37.7, 37.6, 37.7]
AR_small = [21.7, 20.8, 21.6, 21.3, 21.7]
AR_medium = [39.3, 39.1, 39.5, 39.3, 39.4]
AR_large = [53.8, 53.8, 53.3, 53.4, 53.7]

# #### one-shot

# Detection

mAP = [10.5, 10.7, 10.7, 10.5, 10.4]
mAP50 = [19.0, 19.2, 19.0, 19.0, 18.8]
mAP75 = [10.7, 10.7, 10.8, 10.8, 10.1]
mAP_small = [5.6, 5.4, 6.1, 5.9, 5.9]
mAP_medium = [10.4, 10.8, 10.6, 10.4, 10.0]
mAP_large = [17.0, 16.9, 16.2, 16.4, 16.5]
AR1 = [11.6, 12.0, 12.0, 11.7, 11.7]
AR10 = [27.7, 27.7, 27.9, 27.8, 27.7]
AR100 = [29.5, 29.8, 29.6, 29.5, 29.5]
AR_small = [15.0, 14.7, 15.0, 14.7, 14.8]
AR_medium = [32.6, 33.5, 33.2, 33.6, 32.8]
AR_large = [47.1, 48.2, 47.8, 47.2, 47.3]

# Segmentation

mAP = [8.6, 8.6, 8.6, 8.4, 8.3]
mAP50 = [17.0, 16.8, 17.0, 16.7, 16.8]
mAP75 = [8.0, 7.9, 7.8, 7.8, 7.5]
mAP_small = [4.0, 3.8, 4.2, 4.3, 4.1]
mAP_medium = [8.8, 9.0, 9.0, 8.8, 8.5]
mAP_large = [14.8, 14.6, 14.1, 14.4, 14.2]
AR1 = [10.3, 10.4, 10.6, 10.2, 10.1]
AR10 = [24.2, 24.3, 24.3, 24.3, 24.3]
AR100 = [25.9, 26.1, 25.9, 25.8, 25.9]
AR_small = [12.4, 12.0, 12.4, 12.4, 12.3]
AR_medium = [30.2, 31.0, 30.2, 30.6, 30.1]
AR_large = [42.4, 42.4, 42.1, 41.5, 41.7]

# # Analyses main table

import numpy as np

# +
# background detection
mAP50_s1 = [42.5, 42.4, 42.3, 42.2, 42.4]
mAP50_s2 = [40.3, 40.7, 40.5, 40.6, 40.5]
mAP50_s3 = [41.4, 41.5, 41.6, 41.5, 41.7]
mAP50_s4 = [40.8, 40.8, 41.1, 41.0, 40.8]

mAP50 = [mAP50_s1, mAP50_s2, mAP50_s3, mAP50_s4]
mAP50_runwise = [np.mean([mAP50_s1[i], mAP50_s2[i], mAP50_s3[i], mAP50_s4[i]]) for i in range(5)]
mean_mAP50 = [np.mean(mAP50[i]) for i in range(4)]
std_mAP50 = [np.std(mAP50[i]) for i in range(4)]
conf95_mAP50 = [std_mAP50[i]*1.96/np.sqrt(5) for i in range(4)]

print('${:.1f}\pm{:.2f}$'.format(np.mean(mAP50_runwise), np.std(mAP50_runwise)*1.96/np.sqrt(5)))

# +
# background segmentation
mAP50_s1 = [39.8, 39.6, 39.6, 39.7, 39.8]
mAP50_s2 = [37.1, 37.4, 37.3, 37.4, 37.2]
mAP50_s3 = [38.5, 38.7, 38.8, 38.6, 38.9]
mAP50_s4 = [37.9, 37.9, 38.0, 38.2, 37.7]

mAP50 = [mAP50_s1, mAP50_s2, mAP50_s3, mAP50_s4]
mAP50_runwise = [np.mean([mAP50_s1[i], mAP50_s2[i], mAP50_s3[i], mAP50_s4[i]]) for i in range(5)]
mean_mAP50 = [np.mean(mAP50[i]) for i in range(4)]
std_mAP50 = [np.std(mAP50[i]) for i in range(4)]
conf95_mAP50 = [std_mAP50[i]*1.96/np.sqrt(5) for i in range(4)]

print('${:.1f}\pm{:.2f}$'.format(np.mean(mAP50_runwise), np.std(mAP50_runwise)*1.96/np.sqrt(5)))

# +
# one-shot detection
mAP50_s1 = [16.9, 16.7, 16.8, 16.8, 16.6]
mAP50_s2 = [20.0, 20.0, 19.9, 19.9, 20.0]
mAP50_s3 = [18.5, 18.2, 18.3, 18.4, 17.5]
mAP50_s4 = [19.0, 19.2, 19.0, 19.0, 18.8]

mAP50 = [mAP50_s1, mAP50_s2, mAP50_s3, mAP50_s4]
mAP50_runwise = [np.mean([mAP50_s1[i], mAP50_s2[i], mAP50_s3[i], mAP50_s4[i]]) for i in range(5)]
mean_mAP50 = [np.mean(mAP50[i]) for i in range(4)]
std_mAP50 = [np.std(mAP50[i]) for i in range(4)]
conf95_mAP50 = [std_mAP50[i]*1.96/np.sqrt(5) for i in range(4)]

print('${:.1f}\pm{:.2f}$'.format(np.mean(mAP50_runwise), np.std(mAP50_runwise)*1.96/np.sqrt(5)))

# +
# one-shot segmentation
mAP50_s1 = [14.7, 14.7, 14.9, 15.0, 14.8]
mAP50_s2 = [17.7, 18.1, 18.0, 18.2, 18.1]
mAP50_s3 = [17.5, 17.3, 17.5, 17.6, 17.1]
mAP50_s4 = [17.0, 16.8, 17.0, 16.7, 16.8]

mAP50 = [mAP50_s1, mAP50_s2, mAP50_s3, mAP50_s4]
mAP50_runwise = [np.mean([mAP50_s1[i], mAP50_s2[i], mAP50_s3[i], mAP50_s4[i]]) for i in range(5)]
mean_mAP50 = [np.mean(mAP50[i]) for i in range(4)]
std_mAP50 = [np.std(mAP50[i]) for i in range(4)]
conf95_mAP50 = [std_mAP50[i]*1.96/np.sqrt(5) for i in range(4)]

print('${:.1f}\pm{:.2f}$'.format(np.mean(mAP50_runwise), np.std(mAP50_runwise)*1.96/np.sqrt(5)))

StarcoderdataJupyterScriptsDedupFiltered