It's Corn: Corn Seed Image Classification

It’s Corn (PogChamps #3)

Corn Seed Image Classification

fast.ai smashed it. The impact it had in this Kaggle Community Competition is remarkable.

Many of the solutions, including the wining one, are notably influenced by Part 1 2022 Course.

Navigating through the notebooks and discussion is a great source of inspiration and useful information.

In this post I wanted to compile some of the information I found useful.

1st Place Solution

fastai :white_check_mark:

Winning Kaggler Andrew Speers shared the following quality information:

2nd place solution

fastai :white_check_mark:

Kaggler chumajin couldn’t do the inference with a Kaggle notebook but shared the approach in the discussions:

3rd place solution

fastai :white_check_mark:

Ayushman Buragohain (@benihime91) shared lots of information to dig in:

4th position

No information for this solution by khursani. But there exists the same user name in this community @khursani8, so probably it is a fastai solution.

5th position

fastai :white_check_mark:

By Jon Blanchard.

  • Kaggle discussion
    5th Place Reflections
    Here Jon explain that “got stuck with the cleanup called issue” in Keras. So thanks to its corn time notebook by @miwojc he got into fastai. Then he experimented with models from Jeremy’s notebook The best vision models for fine-tuning.
    Interesting his insight in selecting the final model to avoiding the shakeup on private leaderboard by analyzing LB:CV gap, “trusting the CV” and factoring the standard deviation of the folds.
    Hi finally thanks @miwojc, @kurianbenoy and to Nghi Huynh for her suggestions on the CV vs LB discussion.

7th place solution

fastai :white_check_mark:

By LucasPilla.

  • Kaggle discussion
    7th place solution
    Here Lucas clearly explains his simple approach. Stratified 5 folds, GradientAccumulation(128), Default fastai augmentations + vertical flip, only 5 epochs!

  • Kaggle Notebook Submission
    It’s Corn - Train
    Its Corn - Infer
    Clean notebooks that are obviously inspired by Part 1 2022 fastai course.

11th place solution

fastai :white_check_mark:

A fastai solution by our fellow student @miwojc

Used Models

First Place:

convnext_large_in22k
vit_large_patch16_224
swinv2_large_window12_192_22k
swin_large_patch4_window7_224

Second Place:

beit_large_patch16_384
convnext_xlarge_384_in22ft1k
swin_large_patch4_window12_384
deit3_large_patch16_384_in21ft1k
beit_large_patch16_224
convnext_large_in22ft1k
swin_large_patch4_window7_224

Third Place:

beit_large_patch16_224
swin_base_patch4_window12_384_in22k
convnext_large_in22ft1k_224
swin_large_patch4_window7_224

Fifth Place:

vit_base_patch16-224

Seventh Place:

convnext_tiny_in22k
vit_large_patch16_224
swin_base_patch4_window7_224_in22k

Eleventh Place

resnet18
vit_small_patch16_224
swin_base_patch4_window7_224_in22k

11 Likes

I also won the best notebooks award in Corn Seed Image Classification

8 Likes

Very cool to see fastai being used in Kaggle! Do you know of other high-quality notebooks/GitHub repositories that use fastai for computer vision competitions? Thanks!

1 Like

I’m including here a hindsight analysis I did.

I overfit again to the public dataset (like in Paddy Doctor: Paddy Disease Classification) and was down 12 positions.

One experiment that greatly improved the private score in a late submission was simply to train for less epochs. After trying -the same ensemble I choose for my final score- with 12, 8, 6 and 4 epochs, the best score was achieved with only 6! What a lesson.

From this:
image
image

To this:
image
image

Kaggle discussion:
How many epochs are too many? 12 positions shakeup.

Kaggle Notebook:
It’s Corn: 6 models Ensemble - 6 epochs

So it seems important to find a way to know how many epochs are too many. Maybe by looking at train and valid losses? By using different epochs for the ensemble? Improving my CV skills? Using a test set? I’m not sure yet.