hiteshvaidya / Star-wars-classifier

18 stars 7 forks source link

Not able to connect the images folder to tensorflow on Windows #1

Closed anujdutt9 closed 1 month ago

anujdutt9 commented 7 years ago

Hi. I tried your method of connecting the images folder to tensorflow. It gets connected but then there are no images in that. It has the folder flower_photos on tensorflow but when I run the git pull and next commands, it says no images found. The folder is in my current working directory. So I am connecting it using command: "docker run -it -v /tf_files/flower_photos gcr.io/tensorflow/tensorflow:latest-devel" I even tried using "/tf_files:/tf_files/" but didn't worked. Can you please help. Thanks :)

hiteshvaidya commented 7 years ago

Hi,

How did you download the image dataset? If you have used fatkun batch image downloader (as shown in sirajology video) then you need to move all the images to that folder. You can use 'mv' bash command or you can use cut+paste. If you are downloading dataset from google using bash commands like shown on tensorflow tutorial then you have to follow the steps mentioned there (because I didn't use that method, I used method shown by siraj).

Tensorflow tutorial - https://codelabs.developers.google.com/codelabs/tensorflow-for-poets/?utm_campaign=chrome_series_machinelearning_063016&utm_source=gdev&utm_medium=yt-desc#3

Regards, Hitesh Vaidya M: +91-8652848287

On Oct 24, 2016 8:13 AM, "Anuj Dutt" notifications@github.com wrote:

Hi. I tried your method of connecting the images folder to tensorflow. It gets connected but then there are no images in that. It has the folder flower_photos on tensorflow but when I run the git pull and next commands, it says no images found. The folder is in my current working directory. So I am connecting it using command: "docker run -it -v /tf_files/flower_photos gcr.io/tensorflow/tensorflow: latest-devel" I even tried using "/tf_files:/tf_files/" but didn't worked. Can you please help. Thanks :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hiteshvaidya/Star-wars-classifier/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ANgqUIql01b2ubqjp-0jdjHFGS02aNL4ks5q3BtXgaJpZM4KeWGv .

mayur10 commented 7 years ago

I did try the method as given in siraj youtube video but i am unable to move the images into the docker container. can u please help..?? Thanks..!!

hiteshvaidya commented 7 years ago

You can use terminal commands like mv or you could move them normally like you move any other file in your computer

On Sep 27, 2017 9:02 PM, "mayur10" notifications@github.com wrote:

I did try the method as given in siraj youtube video but i am unable to move the images into the docker container. can u please help..?? Thanks..!!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hiteshvaidya/Star-wars-classifier/issues/1#issuecomment-332561158, or mute the thread https://github.com/notifications/unsubscribe-auth/ANgqUBLh_f3MvuZ23Lqr_NdLGPO6qceAks5smmqGgaJpZM4KeWGv .

mayur10 commented 7 years ago

how can i move physically..?? where is the container located so that i can copy paste it..?? I have photos on the desktop, can u tell me the mv command to move the files in my container from my desktop.??

hiteshvaidya commented 6 years ago

mv <source_file_address/source_file_name> <target_folder_path>

paulsonpaul312 commented 6 years ago

docker run -it -v ~/tf_files/flower_photos gcr.io/tensorflow/tensorflow:latest-devel , try the ~ in front of the path, ~ stands for home directory

shahidgeek commented 5 years ago

https://colab.research.google.com/drive/1hFte7dNUZGVukuR0OY02t0atJgMzn6oc#scrollTo=Bl-yFZqKeezp&forceEdit=true&offline=true&sandboxMode=true

Step 0

Replace retrain.py with downloading file from following link and uploading it to same folder in Google drive.

https://raw.githubusercontent.com/tensorflow/hub/master/examples/image_retraining/retrain.py

Step 1

Go to this link :

https://colab.research.google.com/drive/1hFte7dNUZGVukuR0OY02t0atJgMzn6oc#scrollTo=Bl-yFZqKeezp&forceEdit=true&offline=true&sandboxMode=true

Step 2

Go to chapter Two

Step 3

Worked by adding two lines as given following before the script section : LOL

It's a LOL that just added following two lines and it worked before script section and it worked.

Two Lines:

if not os.path.isdir("../Pokemons-subset"):

     print('Error')

Script Section:

 %run scripts/retrainn.py   \

   --bottleneck_dir=tf_files/bottlenecks   \

   --how_many_training_steps=4000   \

   --model_dir=tf_files/models/   \

   --summaries_dir=tf_files/training_summaries/mobilenet_0.50_160   \

   --output_graph=tf_files/retrained_graph.pb   \

   --output_labels=tf_files/retrained_labels.txt   \

   --learning_rate=0.01   \

   --architecture=mobilenet_0.50_160   \

   --image_dir=../Pokemons-subset \

   --flip_left_right \

   --random_crop=10 \

   --random_scale=10 \

   --random_brightness=10