Microsoft Rice Disease Classification Challenge
Can you identify disease in images of rice grown in Egypt?
Prize
$3 000 USD
Time
Ended ~18 hours ago
Participants
262 active · 811 enrolled
Helping
Egypt
Intermediate
Computer Vision
Classification
Agriculture
Support for Tensorflow implementation
Help · 28 Jul 2022, 09:49 · 12

I need some help on tensorflow implementation of this, Anyone used tensorflow framework for this ?

Mostly i'm seeing pytorch implementaion only.

Discussion 12 answers

Hi, are you having errors, etc, or you don't know how to start off with tensorflow?

https://github.com/chhigansharma/MS_RICE

Can you see what i'm doing wrong, trained model but not able to create submission file

Hello @chhigan_sharma. I think i could spot where the problem is coming from.

The solution is as follows below:

First, you may filter all images containing "_rgn" and use only images containing "rgb", all these because "submission file" contains only "rgb" images.

Second, if at all you decide to use both images containing both "_rgn" and "rgb" to train your model, then you will have to use "reindex" to make your created "submission file" conforms with the original submission file provided by Zindi which only contains "rgb" images. Hope this helps.

Cheers!!!

I can see you duplicated several things, nevertheless, you've already successfully created your submission named "results.csv". There is no need to create it again, however, if you want to create it again for some reason, the error in your code is :

test_df["Label"]=predict

it should be

test_df["Label"]=predictions.

Your "predict" variable contains a (2290, 3) shape.

@Professor my real challenge is that my submission file looks like this, so i need help on creating submission file as required by challenge.

Filename Predictions

id_00vl5wvxq3.jpg blast

id_00vl5wvxq3_rgn.jpg blast

d_01hu05mtch.jpg brown

Hi @chhigan_sharma, back to @micadee's comments and a discussion I created earlier, test_ids is not equal to sample submission_ids, the test IDs contain rgn images, but the sample submission does not. You may want to totally remove the rgn images from the test dataframe.

For me I used the sample submission as the test dataframe, makes inference easier. Let's know if this solves your issue.

Winning isn't everything ...

... now that you mention tensorflow ...

... out there you will find a lot of pytorch. It seems to be the way to go. I've competed with some of the best in this space and they luvvvvvv pytorch. I luvvvvvv keras + tf ...

So I entered this comp just to exercise image processing with keras and put pytorch aside for a bit. What a nice experience. Sure, at the moment I am dropping into tripple digits on the LB, but who cares, I did this using my beloved keras. I even did the augmentations in it (didn't know you could when I started).

We have something called loadsheddinng stage 6 ... locals will understand ... so I had to move this to a laptop. Very old laptop, no GPU, no transfer learning, no problemo ... my siamese network now has ~25k weights, trains in less than 30 iterations (without any transfer learning) and still beats the benchmark.

Oh well, that my story for this one - professor or sharma or another, what your story?

well said @skaak, although winning is amazing, for me, It's always about the learning and the sharing of knowledge. I'm a big fan of the Fastai library hence PyTorch, nevertheless in this competition, while most of the credits go to my teammates, I'm in this to work with them, learn more, explore, and share intelligent ideas.

That's my story for this one....lol....😉

Thanks!

Wow, #11 atm. I did not know you doing so well! Congrats, that is amazing. This one is incredibly competitive, those top LB scores are unimaginably good (for me atm at least...)

Fastai ... I remember one reason the image guys like pytorch is it is faster than tf. Well, all the best and thanks for sharing (and helping) prof!

@skaak Smiles.... Expectedly, i've been waiting to hear people talk on this tensorflow. Anyway, strangely to me after a long period of hardwork on this challenge. This so called Tensorflow+tf happened to be my best above pytorch for me in terms of LB score. I know this might sound surprising. In fact, with this kind of single model score using tensorflow+tf with TPU SetUP (running for just 40mins), one can just implement only three different models and that will make it just three(3) submissions to probably win this wondeful challenge after ensembling these three models scores but the most painful part of this is that it's very difficult to reproduce these models scores using tensorflow+tf. So therefore, i calmly switched to my pytorch. But the day these tensorflow models scores are reproducible then one should call it a day on this competition. There's time for everything, and learning is the most important thing here even though winning will be a good plus. No one needs to tell me that I've tried my best. However, i will love to hear people's opinion on how to make this tensorflow approach score reproducible. Cheers..

That's also my own story anyway😍😍😍.

Thanks @skaak for the words, Well for me it's quite simple. I started with Tensorflow and liked it alot hence never thought to learn pytorch.

@MICADEE

Mike!!!! Your score is very good - is it because of TPU? I've never used TPU - does it make that much difference? Having GPU or TPU makes tf reproducibility more difficult, you have to create single session (or so I've heard). At least with just CPU like me you just set seed and you're done.

Are you using kaggle TPU? I started comp with mobilenet - would not win but can run on my hardware. Later I switched to my own even smaller CNN to make it even faster. When comp is done, you must tell me which CNN you used.

Zindi is actually very strict with reproducible requirement and way code has to be submitted and so on.

@chhigan_sharma

Thanks - me more or less same. Long ago I was JOONE developer and when I started using keras it felt very familiar. Pytorch still does things in a funny way (for me). But is like Android and iOS ... choose what you like.