Paris study group March -April 2019

(Edmund Ronald, PhD.) #27


Voici un exemple où l’équipe Fastai gagné un concours avec sa Data Augmentation:

If you want to match our top single-machine CIFAR-10 result, it’s as simple as four lines of code:

tfms = ([pad(padding=4), crop(size=32, row_pct=(0,1), col_pct=(0,1)),
    flip_lr(p=0.5)], [])
data = data_from_imagefolder('data/cifar10', valid='test',
    ds_tfms=tfms, tfms=cifar_norm)
learn = Learner(data, wrn_22(), metrics=accuracy).to_fp16()
learn.fit_one_cycle(25, wd=0.4)

Tu peux lire plus içi:


(Bruno Seznec) #28

Hi Edmond @eronald
Thanks for the link, but to be clear ,
pour la data-augmentation c’est au sein d’une même classe,
si on fait un classifier pour les 3 et les 7 , cela ne donne rien d’augmenter avec des 0 ou X ?
Voici un medium récent sur le one-shot learning en détection d’image
mais c’est plutot du fastai part 2

Bonne semaine

1 Like

(Edmund Ronald, PhD.) #29

Hi Bruno,
Merçi bien de ton commentaire.

Thank you for the link, which is very interesting.

En ce qui concerne les O et le X, cela n’a rien à voir avec les 3 et les 7, le but du jeu est de créer à partir de tout point de départ que tu te choisis, comme par exemple Resnet, un classifieur avec très peu de données de training, quelques gribouillages vite faits., Içi je pense qu’à l’aide de la data augmentation incorporée dans FastAi cet exercice difficile à priori devient un TP à la portée des membres de notre groupe.

Nous le saurons avec certitude lundi prochain!




Bonjour Ronald,
J’ai réussi à faire les 2 exercices et m’apprête à demander à mes enfants de faire des O et des X pour démontrer mes talents de devin. Pas sûr que ça les impressionne, mais cela a été très satisfaisant pour moi !
A lundi,

1 Like

(Edmund Ronald, PhD.) #31

Bonjour Jean-Luc,

Bravo et Félicitations!

Je suis content que vous avez trouvé que ce travail était un bon investissement de temps.

Vous devenez volontaire désigné pour raconter les problèmes rencontrés - et comment ils ont été surmontés - aux autres membres du groupe Lundi prochain.

Vos enfants sont nés dans un monde où les machines savent lire. Pas nous.



(Emma) #32


I am getting lost trying to understand how the predict function from fastAI works.
If someone could explain to me what the reconstruct function does and what an ItemBase is, I would greatly appreciate it. Thanks!


(Bruno Seznec) #33

On an full res image
torch.Size([3, 3968, 2976])

I can predict , but with very low probas

(Category 3, tensor(0), tensor([0.6589, 0.3411]))

Question how to resize an image with fastai lib ??

@EmmaS you can do ItemBase?? but it doesn’t exist ??


(Bruno Seznec) #34

For resize a quick search in the forum

verify_images [source][test]

verify_images ( path : PathOrStr , delete : bool = True , max_workers : int = 4 , max_size : int = None , recurse : bool = False , dest : PathOrStr = '.' , n_channels : int = 3 , interp = 2 , ext : str = None , img_format : str = None , resume : bool = None , **** kwargs** )

1 Like

(Emma) #35

So far, I understood that the images can be directly resized when you call the ImageDataBunch function with the parameter size=224 for example, which will resize your images to 224x224 during training. I don’t know if it accepts different height and width as input. This should be tested.


(Edmund Ronald, PhD.) #36


The part I don’t understand is why you don’t go out and ask your questions on the US-based part of these forums etc. You’re all supposed to be qualified people with degrees, you have access to people and even source code (!). What’s the reason for this inertia?
I don’t have the slightest idea myself how the fastai classes work, as we all know too well, but I am sure that running a few queries in a notebook or looking at the source code would clarify matters, and also there is always the documentation on which points to the source

I guess people who are smarter than me will demo all this in real time at the practical tonight at Octo.



(Edmund Ronald, PhD.) #37

There is debate whether we should follow the course sequence, or skip ahead to NLP.




(Bruno Seznec) #38

my opinion :
Skip ahead to NLP, =
end of Lesson 3 , when Jeremie presents TextDataBunch and lesson3-imdb notebook
and Lesson4


1 Like

(Amine Saboni) #39

Imo if we switch to NLP, we should before end computer vision by the TP you gave us Edmund. Emma will have a nice solution to present you I guess. ^^

1 Like

(Andrew) #40

Hello / Bonjour ! I just discovered that there was a Paris study group. Would it be OK to join in mid-way through for your next meet-up?

1 Like

(Edmund Ronald, PhD.) #41

The fact that we can ask these questions seriously shows we are making good progress on the course materials!

I guess we’ll compromise between the progressives and the conservatives and mix and match. :slight_smile: Some people are getting bored with vision, but it’s worth doing a bit more. And a bit of early discussion and spreading out NLP will help people adapt to this new topic.

BTW I like the Francois Chollet book on Keras a lot. Eyrolles just got a whole batch of them, but they’re expensive.

Keras may not be the same set of classes we are using, but it’s Google’s simple wrapper for TensorFlow, widely employed, and the book is really nice, explaining the concepts of a lot of the material we are covering. Jeremy is in a hurry in his videos, and the book sort of fills in some of the holes. What can I say - I love Jeremy’s videos and the FastAI classes are great but I also like François’ book.

BTW, I just found an entertaining article, relevant to our current exercises, but using Keras …maybe you want to do something like this with FastAI.



(Edmund Ronald, PhD.) #42

No prob.



(Bruno Seznec) #43

Could not make it this week. I will ok next week, but monday will be off. So in 2 weeks. Could you share somewhere your project ! Thanks and good meetup


(Edmund Ronald, PhD.) #44

Hello Bruno.

I got bored -as everyone knows I have the attention span of a housefly, and no work ability- so people can watch the videos and run the scripts etc on their own and of course ask questions or raise issues during the study group.

Our first project is live smile detection from notebook cam. I think we should have dealt with that in 2 sessions so then we’ll see what the next project is.

Hope you will get better soonest, and well quite soon …



(Bruno Seznec) #45

Hello Edmund,

I think, I will be allrigth next monday ! :slight_smile:

Thanks for your mail

Take care



(Bruno Seznec) #46

What are the news ?
No more meetup at Octo?