Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,267 changes: 1,267 additions & 0 deletions Cifar10/CNN/inceptionV3.ipynb

Large diffs are not rendered by default.

210 changes: 194 additions & 16 deletions Cifar10/cifar10_preprocessing.ipynb

Large diffs are not rendered by default.

30 changes: 29 additions & 1 deletion Cifar10/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# !NOTE: constants MUST be in uppercase to be recognized by the codebase

# slice of images to evaluate the models on
N_IMAGES_SLICE = 2000
N_IMAGES_SLICE = slice(0, 2000)

# quantized models top-1 accuracies on quantized Cifar-10 output file path
MODELS_ACCURACY_PATH = './datasets_data/_models_evaluation_stats.txt'
Expand Down Expand Up @@ -46,6 +46,34 @@

#============================================================

# cifar10 x inceptionV3 uint8 preprocessed validation images outputs path
INCEPTIONV3_U8_MODEL_PATH = "./models_data/inceptionV3/inceptionV3_uint8_cifar10.tflite"
INCEPTIONV3_U8_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_inceptionV3/uint8/cifar10_u8_inceptionV3_validation'
INCEPTIONV3_U8_2K_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_inceptionV3/uint8/cifar10_u8_inceptionV3_2k_validation'
INCEPTIONV3_U8_500_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_inceptionV3/uint8/cifar10_u8_inceptionV3_500_validation'

# cifar10 x inceptionV3 int8 preprocessed validation images outputs path
INCEPTIONV3_I8_MODEL_PATH = "./models_data/inceptionV3/inceptionV3_int8_cifar10.tflite"
INCEPTIONV3_I8_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_inceptionV3/int8/cifar10_i8_inceptionV3_validation'
INCEPTIONV3_I8_2K_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_inceptionV3/int8/cifar10_i8_inceptionV3_2k_validation'
INCEPTIONV3_I8_500_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_inceptionV3/int8/cifar10_i8_inceptionV3_500_validation'

#============================================================

# cifar10 x resnet34 uint8 preprocessed validation images outputs path
RESNET34_U8_MODEL_PATH = "./models_data/resnet34/resnet34_uint8_cifar10.tflite"
RESNET34_U8_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_resnet34/uint8/cifar10_u8_resnet34_validation'
RESNET34_U8_2K_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_resnet34/uint8/cifar10_u8_resnet34_2k_validation'
RESNET34_U8_500_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_resnet34/uint8/cifar10_u8_resnet34_500_validation'

# cifar10 x resnet34 int8 preprocessed validation images outputs path
RESNET34_I8_MODEL_PATH = "./models_data/resnet34/resnet34_int8_cifar10.tflite"
RESNET34_I8_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_resnet34/int8/cifar10_i8_resnet34_validation'
RESNET34_I8_2K_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_resnet34/int8/cifar10_i8_resnet34_2k_validation'
RESNET34_I8_500_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_resnet34/int8/cifar10_i8_resnet34_500_validation'

#============================================================

# cifar10 x resnet50 uint8 preprocessed validation images outputs path
RESNET50_U8_MODEL_PATH = "./models_data/resnet50/resnet50_uint8_cifar10.tflite"
RESNET50_U8_VALIDATION_SET_PREPROCESSED_PATH = './datasets_data/cifar10_x_resnet50/uint8/cifar10_u8_resnet50_validation'
Expand Down
2 changes: 1 addition & 1 deletion ImageNet2012/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# !NOTE: constants MUST be in uppercase to be recognized by the codebase

# slice of images to evaluate the models on
N_IMAGES_SLICE = 2000
N_IMAGES_SLICE = slice(0, 2000)

# quantized models top-1 accuracies on quantized Imagenet2012 output file path
MODELS_ACCURACY_PATH = './datasets_data/_models_evaluation_stats.txt'
Expand Down
6 changes: 4 additions & 2 deletions download_models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ case "$dataset" in
models=("efficientnetB0" "mobilenet" "mobilenetV2" "resnet50" "resnet152" "vgg16" "vit-b_16p_224")
;;
"cifar10")
models=("alexnet" "efficientnetB0" "mobilenet" "mobilenetV2" "resnet18" "resnet34" "resnet50" "resnet152" "vgg16")
models=("alexnet" "efficientnetB0" "mobilenet" "mobilenetV2" "resnet18" "resnet34" "resnet50" "resnet152" "vgg16" "inceptionV3")
;;
"gtsrb")
models=("mobilenet" "mobilenetV2" "resnet18" "resnet34")
Expand All @@ -44,7 +44,7 @@ done
# Step 3: Select precision
#########################################
case "$model" in
"lenet5"|"efficientnetB0"|"mobilenet"|"mobilenetV2"|"vgg16"|"alexnet"|'resnet18'|'resnet34'|'resnet50'|"resnet152"|"vit-b_16p_224")
"lenet5"|"efficientnetB0"|"mobilenet"|"mobilenetV2"|"vgg16"|"alexnet"|'resnet18'|'resnet34'|'resnet50'|"resnet152"|"vit-b_16p_224"|"inceptionV3")
precisions=("fp32" "uint8" "int8")
;;
*)
Expand Down Expand Up @@ -90,6 +90,8 @@ elif [[ "$model" == "mobilenetV2" && "$dataset" == "cifar10" ]]; then
REPO_ID="jack-perlo/MobileNetV2-Cifar10"
elif [[ "$model" == "vgg16" && "$dataset" == "cifar10" ]]; then
REPO_ID="jack-perlo/Vgg16-Cifar10"
elif [[ "$model" == "inceptionV3" && "$dataset" == "cifar10" ]]; then
REPO_ID="jack-perlo/InceptionV3-Cifar10"
elif [[ "$model" == "resnet50" && "$dataset" == "imagenet2012" ]]; then
REPO_ID="jack-perlo/ResNet50-ImageNet2012"
elif [[ "$model" == "resnet152" && "$dataset" == "imagenet2012" ]]; then
Expand Down
Binary file modified readme_assets/accuracy_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 13 additions & 6 deletions readme_assets/utils.ipynb

Large diffs are not rendered by default.