Skip to content

Question: retrain.py: Addition to read in file list (with data set split) and confusion matrix output #182

@andreas-seiderer

Description

@andreas-seiderer

Hello,

We conducted some image transfer learning experiments with four embedded / mobile ARM devices (CPU only) and several models where we used an adapted version of the retrain.py script.

We wrote a paper which is not available yet but we have a companion repository with the plots / measurements / used scripts to allow reproduction / simplify further tests: https://github.com/hcmlab/tf-transferlearning-benchmarks

Some of the changes done to the retrain.py script were just to add additional logging but we also required a function allowing us to read in a file list with adapted training / validation and test splits (retrain_hub_filelists.py). Example file: flower_photos_list_default.tsv
I added an additional parameter which can be used instead of "image_dir".

Additionally, I added a file output of a confusion matrix to allow a more detailed evaluation (e.g. recall / precision) of the test set: code, example file

Although the script is intended as an example, I think these additions could also be of use for others. Is there interest on your side to add these features to the current version of the official retrain.py script?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions