Event Timeline
Running this prototype returns the response below:
[ { "filename": "12_rue_de_Cond\u00e9_-_detail.jpg", "target": "logo", "prediction": { "logo": 0.0, "out_of_domain": 1.0 } }, { "filename": "Abv.png", "target": "logo", "prediction": { "logo": 1.0, "out_of_domain": 0.0 } }, { "filename": "BackupVault_Logo_2019.png", "target": "logo", "prediction": { "logo": 1.0, "out_of_domain": 0.0 } }, { "filename": "Blooming_bush_(14248894271).jpg", "target": "logo", "prediction": { "logo": 0.009999999776482582, "out_of_domain": 0.9900000095367432 } }, { "filename": "Cambia_logo.png", "target": "logo", "prediction": { "logo": 1.0, "out_of_domain": 0.0 } }, { "filename": "Elizabeth_Drive_-_border_of_Edensor_Park_and_Bonnyrigg_Heights_in_New_South_Wales_62.jpg", "target": "logo", "prediction": { "logo": 0.0, "out_of_domain": 1.0 } } ]
Running this change of the prototype returns the response below. We noticed the out_of_domain values for Abv.png and Cambia_logo.png are >1, specifically 8.932123455451801e-05 and 4.754207475343719e-05 respectively. @mfossati is this expected behavior?
[ { "filename": "12_rue_de_Condé_-_detail.jpg", "target": "logo", "prediction": 0.0008389077847823501, "out_of_domain": 0.9991611242294312 }, { "filename": "Abv.png", "target": "logo", "prediction": 0.9999107122421265, "out_of_domain": 8.932123455451801e-05 }, { "filename": "BackupVault_Logo_2019.png", "target": "logo", "prediction": 0.9995936751365662, "out_of_domain": 0.00040629858267493546 }, { "filename": "Blooming_bush_(14248894271).jpg", "target": "logo", "prediction": 0.0051296367309987545, "out_of_domain": 0.9948704242706299 }, { "filename": "Cambia_logo.png", "target": "logo", "prediction": 0.9999524354934692, "out_of_domain": 4.754207475343719e-05 }, { "filename": "Elizabeth_Drive_-_border_of_Edensor_Park_and_Bonnyrigg_Heights_in_New_South_Wales_62.jpg", "target": "logo", "prediction": 0.0006882766610942781, "out_of_domain": 0.9993116855621338 } ]
The trailing e-05 notation means 10^-5, so the values can be read as 0.000089 ... and 0.000047 .... I think we can safely round them anyway. Done in https://gitlab.wikimedia.org/mfossati/scriptz/-/merge_requests/6/diffs?diff_id=51201&start_sha=24877299226efb565d4f17f576ff7c91c8b4e1f9.
Thank you for the clarification, I've run the version that rounds the floats and below are the results. Please confirm whether the prototype is returning the expected output.
[ { "filename": "12_rue_de_Condé_-_detail.jpg", "target": "logo", "prediction": 0.0008, "out_of_domain": 0.9992 }, { "filename": "Abv.png", "target": "logo", "prediction": 0.9999, "out_of_domain": 0.0001 }, { "filename": "BackupVault_Logo_2019.png", "target": "logo", "prediction": 0.9996, "out_of_domain": 0.0004 }, { "filename": "Blooming_bush_(14248894271).jpg", "target": "logo", "prediction": 0.0051, "out_of_domain": 0.9949 }, { "filename": "Cambia_logo.png", "target": "logo", "prediction": 1.0, "out_of_domain": 0.0 }, { "filename": "Elizabeth_Drive_-_border_of_Edensor_Park_and_Bonnyrigg_Heights_in_New_South_Wales_62.jpg", "target": "logo", "prediction": 0.0007, "out_of_domain": 0.9993 } ]
Once we have this confirmation, we can work on input validation and image limits. The goal is to get your requirements correct before we integrate the prototype into KServe and host it on LiftWing.
Thank you for the confirmation. I have pushed an MR for input validation and image limits: https://gitlab.wikimedia.org/mfossati/scriptz/-/merge_requests/7
Please have a look whenever you have a minute. Thanks!
Thanks for the review. I have pushed an MR to handle image download errors: https://gitlab.wikimedia.org/mfossati/scriptz/-/merge_requests/8
Please have a look whenever you have a minute. Thanks!
Thanks for the review. I have pushed an MR that creates a LogoDetectionModel class with its respective methods and type hinting: https://gitlab.wikimedia.org/mfossati/scriptz/-/merge_requests/9
This will enable us easily integrate the prototype into KServe. Please have a look whenever you have a minute. Thanks!
Thanks for all the reviews as we built this prototype, @mfossati! Please confirm whether it is currently taking the input format as specified in T358676#9650781, preprocessing with Keras in the correct way, and returning the expected output (T358676#9637065). Once we receive your confirmation, the ML team will proceed to integrate it into KServe and create a model server that will be hosted on LiftWing.
@kevinbazira , I can confirm that inputs and outputs are fine.
FYI, I've fixed the expected type of the image dataset, so please use the latest commit.
Great! Thank you for the confirmation and fixing the dataset type hint. We shall use the latest version of the prototype.