Skip to content

Commit

Permalink
added comment and fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Flippchen committed Aug 16, 2023
1 parent 9d2885e commit 62af187
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ To improve accuracy and prediction capabilities, I have experimented with two en
- More balanced predictions
- Better prediction accuracy
2. Car Type hierarchy with car series (specific car type) (weighted average)
- Description: Created a hierachy of models. The first models predicts the car type. The second model predicts the car series. After this the results get aligned with the car type model.
- Description: Created a hierarchy of models. The first models predicts the car type. The second model predicts the car series. After this the results get aligned with the car type model.
- Achievements:
- much less outlier predictions
- better prediction accuracy
Expand Down
20 changes: 20 additions & 0 deletions web_ui/main_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,23 @@ def classify_image(image_data: str, model_name: str, show_mask: bool = False) ->

eel.init("web")
eel.start("index.html", size=(1000, 800), mode="default")


"""How the car_type/car_series ensemble works:
Incorporating Hierarchical Predictions for Porsche Images
Hierarchy Setup:
Create a mapping between 'car type' (e.g., Macan, 911) and 'car series' (e.g., 911_991, Macan_95B).
Prediction Process:
Get the top predictions for 'car type' using Model 1.
Predict 'car series' using Model 2.
Adjustment:
For each 'car type' from Model 1:
Filter 'car series' predictions of Model 2 that align with the hierarchy.
Adjust the probabilities of these 'car series' predictions based on 'car type' probability.
Sort and combine the adjusted predictions.
"""

0 comments on commit 62af187

Please sign in to comment.