Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update nano install docs - python3-opencv vs libopencv-python * change slack to discord on readme * Donkeycar 4.x release. (#644) ## Major Improvements - New Datastore. - More ways to pre-process image data for training. - Use the 2.x version of Tensorflow. - Lots of other minor improvements. * Improvements to the car app and handling of KerasPilot parts: (#648) * Improvements to the car app and handling of KerasPilot parts: * Created a simpler webserver or joystick car app by modifying and renaming the basic_web into basic template and switched this on as default. Also renamed the target from 'manage.py' to 'drive.py' because there is only driving and no training included * Simplified the handling of uint8 and float32 numpy image arrays. KerasPilot.run() now expects uint8 data, transforms into float32 and delegates to its children. The corresponding rescaling step is gone from the car app * smaller updates/fixes to environment and config files * added support for tflite pilots in makemovie * Improvements to the car app and handling of KerasPilot parts: * Added docstring to KerasPilot methods * Fixed bad merge for model types in complete config * Add configuration to allow creating sub directories for each tub (like the legacy tub) or by default store all recordings in the data directory directly. (#649) * Update setup.py with progress module for pi (#650) * Update setup.py * Update setup.py Made changes online. * Add testing for training: (#651) * added example tub data as tar.gz in tests with 1000 records * check validation data size in train * created new test_train.py * added support for read-only tub, required to create r/o tub in tmp dir * changed loss in categorical model to equally weight throttle and steering * changed mod on scripts to u+x * Rename `drive.py` to `manage.py` to preserve CLI compat. (#656) * Train still prompts you to move to then new entry point. * Also fixes #655 * Cleanup exit handlers in the new datastore. (#657) * Minor datastore_v2 improvements. (#658) * Add __exit__ handlers again. * Use `os.linesep` to deal with line separators consistently. * Be explicit about newline characters (#660) * Be explicit about newline characters #2 (#661) * Remove the extra flush(). Windows is less forgiving (#662) * Remove redundant code (#663) * Windows Doc Updates (#668) Added more options for Installing Donkey Car on Windows. - Anaconda - Native - Windows Subsystem for Linux (WSL) - experiential These options give more flexibility and could make deployment easier for some individuals. I personally always install donkey car natively onto Python installed on the System. I will be looking more into WSL going forward as it has some interesting benefits. * Integrate osx into travis. (#665) * add in --user flag for MakeMovie so that you can select if you want to draw the line on the video or not. default: true * updated args.draw_user_input * update to include recommendations * added in brake functionality for simulator only fix typo in drivemode return which checked pilot/throttle instead of brake * fix autorope/issue #671 (#672) * Jonathans changes from issue #634 and PR #646 (#676) * Bump version to 4.0.1 (#677) * Fix template docopt, as it's called managed.py and not drive.py * Allow overriding WEB_CONTROL_PORT from env variable * - Add simulator support to basic.py (#682) - Update cfg_basic.py with simulator parameters * Switch to using memory-mapped files when reading. (#691) * This makes reading a 100x faster. * new: mqtt telemetry support (#688) * A configurable training pipeline. (#693) * Implement a Lazy transformable pipeline. * Implement basic batching. However, this will need to be improved further for models with multiple outputs. * Replace the old `Sequence` implementation used with a new `Pipeline`. Test: Ran end to end tests. * The telemetry mqtt test is breaking w/ a timeout on the connection to the server. * change the public mqtt server name to one that's listening * * Overriding inference in TensorRT as pass as it is not needed here. (#698) * Need to implement inference to run on the normalised image (#699) * Fix sequence iterators (#704) * Change training pipeline from tf.Sequence to tf.data (#701) * Improve pipeline use: move from building list of pipelines of single transforms to building a single pipeline with a list of transforms (actually just looping through function to go from TubRecord -> image -> augment -> normalise -> x and TubRecord -> y). Fixed TfmIterators and TfmIterables. * Iterables are the containers and are sized - these are the user objects * Iterators are protocol objects to allow iteration, they have no logic and are local to the Iterables * build/map_pipeline both return sized Iterables * removed all batch logic, this is not required * still commented but left code that uses generator based pipeline as this is simpler code Using new small temporary pipeline generator * this keeps the TubSequence lazy and avoids to roll out the pipeline into a list * added a test to check consistency of the pipeline * remove empty (after moved) augmentation file * removed augmentation from old tub (as it's not needed and we removed the old augmentation) New pipeline changes: * moved augmentation into own class that is used above and can be used a threaded or non-threaded part * moved train functionality out of template and added 'donkey train', train.py just a simple dummy script for backward compatibility * Address code reviews: * Re-base on current dev to use un-altered sequence.py * Add iterator consistency test to pipeline tests * Undo changes in fast_stretch.py * better tf shape manipulation * small code improvements in training.py * remove sleep in augment part * Address code reviews: * Add clearing of tubrecord list and minor renamings * * Add support for multi-dimensional model input and making the x, y interface symmetrical on the model / training interface: (#707) - x/y_transform extract x, y as numpy arrays or floats out of the record - x/y_translate convert the numpy arrays of floats into tf-readable dictionaries used in tf data. * Simplify model interface by implementing output_types() directly in the base class using output_shapes() dictionary. * Adding developer guide for own model development * Updated donkey command documentation * Improve asserts and type hints in keras.py * Added missing __init__.py in parts module. * Add cool ascii text for donkey init and update yml and setup files including mypy * Remove model training test from Travis and change the test to relative convergence. This avoids random fall overs in CI. * Added test of tf.data as used in the training pipeline through re-implementation of data transformation from tub records to tf expected dictionaries, for all currently supported models. * Minor changes for 4.1 in tub conversion script and developer doc (#708) * Minor changes for 4.1 * Update conversion script to translate discontinuous data. * In developer guide add disclaimer for version and correct intra-page links. * * Update doc with donkey train command. * Update doc with developer section for building own models in donkey 4.1 * Integrate changes from PR feedback * Incorporate PR feedback * Add empty records concept to tub * Minor updates to conversion script * Incorporate PR feedback * Add empty record type into conversion script * docs: fix simple typo, unfarmilar -> unfamiliar (#714) There is a small typo in docs/guide/host_pc/setup_windows.md. Should read `unfamiliar` rather than `unfarmilar`. * Added the ability to train PyTorch models (#706) * Added in PyTorch and PyTorch Lightning to train a DC model Successfully able to train a ResNet18-based model using PyTorch Lightning. * Removed hard-coded max number of epochs (used for debugging) * Added an inference transform to ResNet18 to convert PIL -> tensor * Unsqueezed input tensor during inference for batch dimension * Reshaped ResNet output from (1, 2) to (2,) * Added the ability to resume training from a checkpoint * Added helper print message when tensorboard logging is enabled * Updated docopt arguments for train.py. Made checkpoint optional * Changed TorchTubDataset from sub-classing Dataset to IterableDataset This was done in response to #706 (comment) * Renamed load_image_arr to load_image. Updated load_pil_image load_pil_image will now handle converting the image to greyscale (vs. this being done in load_image). * Updated enviroments for Mac and Ubuntu. Set Python=3.7 * Updated installation documentation. Added script to setup Nano Updated the installation instructions for Ubuntu, Mac, and Windows. Clarified a common issue that occurs when running pip install -e .[pc] with ZSH. Also added a script to setup the Jetson Nano and updated the documentation for the Nano (it previously was installing tensorflow 1.x). * Added torch flag to setup.py to install pytorch * Moved pytorch training into base.py and removed from train.py * Moved Jetson Nano python package installation into requirements.txt * Formatted with PEP8 to clean up pytorch code * Updated docs to provide work-around for ZSH pip install -e .[pc] * Removed duplicate dependencies in conda env files * ResNet18 torch model now returns training loss history * Added test file for PyTorch training Still need to make sure this passes Travis CI. * Added lightning_logs to .gitignore * You can now specify the default AI framework to use in config.py This reduces the number of command line arguments you are required to provide. * get_model_by_type for PyTorch now lazy imports ResNet18 * Added help message to torch_train. Got rid of linear model type * Updated pytorch tests and fixed some syntax errors * ResNet18 example input shape updated to be (B, 3, 224, 224) Also now passing output_shape to load_resnet18 to modify how many output classes are used * No longer pinning requirement versions for Jetson Nano * Fixed formatting in setup.py * update configuration so that IMAGE_H and IMAGE_W are passed through to the simulator (#674) Co-authored-by: Jordan Whited <[email protected]> Co-authored-by: Tawn Kramer <[email protected]> Co-authored-by: wallarug <[email protected]> Co-authored-by: sctse999 <[email protected]> Co-authored-by: DGarbanzo <[email protected]> Co-authored-by: Craig <[email protected]> Co-authored-by: DocGarbanzo <[email protected]> Co-authored-by: Meir Tseitlin <[email protected]> Co-authored-by: Tim Gates <[email protected]> Co-authored-by: Eric Wiener <[email protected]>
- Loading branch information