Lesson-1: Food-101 (beyond the NotHotDog app)

Hi group, the work I would like to do for this great course is a food dish calories calculation, I still have no idea how to calculate the volume and size in a flat image but that will be for later. Right now I want to use what I learned in Lesson 1 for the recognition of dishes, and I have a problem.

I have a dataset food-101, The data is organized as follows:

  1. food-101
    • images
      • fried-calamari
        • 10896.jpg
      • fried rice
        • 17569.jpg
    • meta
      • train.txt => [“156743.jpg”, “564378.jpg” …]
      • test.txt => [“176743.jpg”, “984378.jpg” …]

I was able to change the names (I know, for you it’s very easy), now I don’t know how to organize the folders. At first I thought:

os.makedirs(’~/food-101/train’, exist_ok=True)
os.makedirs(’~/food-101/valid’, exist_ok=True)
os.makedirs(’~/food-101/test’, exist_ok=True)

and in each of these folders a for to create a folder for each of the food dishes :persevere::persevere::persevere:.

and then transfer each image to those folders using the files in the meta folder, but I know that there must be a better way for the network to accept the data, any suggestions?, you would be very helpful, thank you.

and another thing, I have the file train. txt, I can split the names in training and validation from the file itself or I must upload the images first.

Why not write a global function to automate the stuff?
I did something like that…
@VictorArias
https://drive.google.com/file/d/12tTBkoGnivnNkWir4bBhmQYz_CN_Ogwm/view?usp=drivesdk

thank you for you answer @ecdrid, yes i am writing a function, but the question is, is there a better manner?

https://drive.google.com/file/d/12tTBkoGnivnNkWir4bBhmQYz_CN_Ogwm/view?usp=drivesdk
Wrote a function to do this using shutil…
But I had a .CSV file…

1 Like

owwwww ok, i understand, i try this, thanks. definitely the best method is to move them with a for. yes a little different @ecdrid, but the idea is good. right now i try with https://mmspg.epfl.ch/food-image-datasets, is more little dataset, but it’s more organized, thank you.

1 Like

Hey VictorArias, am try something pretty similar, would you mind saying in brief exactly what you did to solve the issue and go through?

With regards,
Xovo Larjem https://8ballpool.onl/
https://googlehangouts.ooo/
https://omegle.onl/