Rob174 / PIR

1 stars 0 forks source link

model_keras Résultats actualisés #25

Open Rob174 opened 3 years ago

Rob174 commented 3 years ago

All the code can be found on the enetv1 branch

Rob174 commented 3 years ago

Fonction d'approximation des prédiction

The network outputs a vector with the number of element for each class as floats However a non integer number of object is not real. That is why we can use the integer part (noted int) or the round function (noted round) to obtain integers.

Training error results

train_errors_intround_2@4x

Valid error results

Asset 7@4x

train_error_intround_legend_1@4x

Interesting elements

Increasing validation error with round

Asset 9@4x

Asset 11@4x

Confusion matrices

🔖 We cannot generate a confusion matrix without approximation function : we would have many different number of objects too often. It would produce a too big confusion matrix

Confusion matrices

👍 Class above 90% accuracy : animal, child,construction_worker,personal_mobility, police_officer, stroller, wheelchair, debris, pushable_pullable, bicycle_rack, bicycle, bus.bendy, bus.rigid, vehicle.construction, ambulance,police, emergency.police, motorcycle

👎 Class below 90% accuracy (generally even below 50%) : 2 subcategories 1️⃣ High variability confusion matrices : adult, barrier, trafficicon, trailer, truck

Common characteristics of confusion matrices

Consequences

individualImage (3) individualImage (4)

2️⃣ Confusion matrices with a better uniform repartition of the number of object (car class only)

Common characteristics

Consequences

individualImage (5)

==> We will have to be careful with high variability

Rob174 commented 3 years ago

Impact of number of modules

Training error results

2021-05-05 22_40_24-TensorBoard

Validation error results

2021-05-05 22_41_45-TensorBoard

Asset 12@4x

:notebook: Not much improvements from the reference model : we can observe a improvements with 2 modules on the following classes :

But worse results on the following classes

Rob174 commented 3 years ago

Regularization

Training error %

Asset 14@4x

Validation error %

Asset 13@4x

Asset 16@4x

Confusion matrices

Object type Reference model error Best
adult 8% Regularization everywhere : 63%
barrier 3% Regularization everywhere : 10%
trafficicon 81% Regularization everywhere : 87%
trailer 27% Regularization on only the last dense layer : 77%
truck 56% Reference model
car 7% Regularization everywhere : 15%

📓 Best : Regularization everywhere

Rob174 commented 3 years ago

Vector transformation layer

Training error %

Asset 17@4x

Validation error %

Asset 18@4x

Asset 19@4x

Note : The GlobalAveragePooling layer is used in the reference model

Confusion matrices

Object type Reference model error Best
adult 8% SPP : 40%
barrier 3% SPP : 5%
trafficicon 81% Flatten : 85%
trailer 27% SPP : 66%
truck 56% Modèle de référence
car 7% SPP : 15%

📓 Best : SPP

Rob174 commented 3 years ago

Dropout

Training errors metrics

2021-05-08 17_52_21-TensorBoard

Validation errors metrics

2021-05-08 17_52_42-TensorBoard Asset 21@4x

Matrices

Object type Reference model error Best
adult 8% Reference model
barrier 3% 8%, 20% dropout
trafficicon 81% Reference model
trailer 79% 89%, 20% dropout
truck 56% Reference model
car 7% 17%, 20% dropout

📓 Best : 50% or 20% dropout

Rob174 commented 3 years ago

Final activation function

Training error

2021-05-08 18_09_48-TensorBoard

Validation error

2021-05-08 18_10_06-TensorBoard Asset 22@4x

Confusion matrices precisions

Object type Reference model error Best
adult 8% 52% relu
barrier 3% 84% relu
trafficicon 80.61% 86.53% relu or softplus
trailer 79% 90.04% relu
truck 56% 63.28% exp
car 7% 21.27% softplus

📓 Best : relu or softplus

Rob174 commented 3 years ago

Adam optimizer : lr and epsilon

Training error

2021-05-08 18_23_38-TensorBoard

Validation error

2021-05-08 18_24_01-TensorBoard

Asset 23@4x

Confusion matrices

Object type Reference model error Best
adult 8% 57.44% lr=1e-3 ; ε=1e-2
barrier 3% 58.57% lr=1e-5 ; ε=1e-2
trafficicon 80.61% 86% (lr=1e-5 ; ε=1e-2) or (lr=1e-1 ; ε=1e-7) ou (84%) (lr=1e-4 ; ε=1e-7)
trailer 79% 90% (lr=1e-3 ; ε=1e-5)
truck 56% 57% (lr=1e-3 ; ε=1e-5) or reference (lr=1e-3 ; ε=1e-7)
car 7% 20% (lr=1e-3 ; ε=1e-5)

📓 No real best parameters

Rob174 commented 3 years ago

Input image size

Training curve

2021-05-10 01_46_04-TensorBoard

Validation curve

2021-05-10 01_46_35-TensorBoard

Asset 24@4x

Object type Reference model error Best
adult 8% 92% 128 x 72 px
barrier 3% 93% 128 x 72 px
trafficicon 80.61% 97% 128 x 72 px
trailer 79% 94% 128 x 72 px
truck 56% 81% 128 x 72 px
car 7% 54% 128 x 72 px