kkmehta03 / AutRcCar

Autonomous RC car using Raspberry Pi. Uses picamera data, OpenCV for processing, along with ultrasonic sensor data to drive autonomously.
14 stars 5 forks source link

Training images #4

Open HarshRangwala opened 4 years ago

HarshRangwala commented 4 years ago
  1. How many training images did you collect before converting them into a .npz file?
  2. What does this line mean exactly? I feel like its meaning corresponds to the number of photos I should collect otherwise I will get an error during training phase? image_array1 = np.zeros((1,38400),'float') Please answer soon. Its urgent!!

Thank you.

kkmehta03 commented 4 years ago

Hey Harsh!

  1. It's been a while, but I think we collected close to about 3000 images in total for each direction.
  2. So image_array1 is actually a numpy array initialised with the total number of pixels. Say, you have a color (implying that it's 3 channel) image of size 120 320, then your image_array1 = np.zeros((1,115200), 'float') I remember that 38400 is a product for a single channel image (black and white), where the pixel size was 120 320 pixels. Since you're using labelling code, I think this could suffice for you
HarshRangwala commented 4 years ago

Okay. Thank you! I got the idea. Sorry but I am a little confused between

np.zeros((1,115200), 'float' and np.zeros((1, 38400), 'float'

If I choose the wrong number then I get an error during model training (saying something like vale needs to be the same). could you please explain how can one decide which correct number to choose i.e how to derive the meaning of the number?

To add an example: lets say I collect 1k or 3k image samples of each direction how should I decide to choose the image_array? just wanna understand that.