I modified the following files in kuaikai competition.
I use the linear model in kuaikai competition. I don't do experiment to compare the linear model and classification model. So I don't know which is the best. I also crop the image, so the shape of CNN's input is (99,160,1)
I convert the image from RGB color space to HSV color space and select the V channal as the input of the CNN.
If you customlize your image preprocess in donkeycar/parts/datastore.py line 358 during training , you can add the image preprocess code at here for predicting.
Donkeycar is minimalist and modular self driving library for Python. It is developed for hobbiests and students with a focus on allowing fast experimentation and easy community contributions.
- Make an RC car drive its self.
- Compete in self driving races like DIY Robocars
- Experiment with autopilots, mapping computer vision and neural networks.
- Log sensor data. (images, user inputs, sensor readings)
- Drive your car via a web or game controler.
- Leverage community contributed driving data.
- Use existing harsupport supportdware CAD designs for upgrades.
After building a Donkey2 you can turn on your car and go to http://localhost:8887 to drive.
The donkey car is controlled by running a sequence of events
#Define a vehicle to take and record pictures 10 times per second. from donkeycar import Vehicle from donkeycar.parts.camera import PiCamera from donkeycar.parts.datastore import Tub V = Vehicle() #add a camera part cam = PiCamera() V.add(cam, outputs=['image'], threaded=True) #add tub part to record images tub = Tub(path='~/d2/gettings_started', inputs=['image'], types=['image_array']) V.add(tub, inputs=['image']) #start the drive loop at 10 Hz V.start(rate_hz=10)
See home page, docs or join the Slack channel to learn more.