Skip to content
Snippets Groups Projects
Commit 86b1c132 authored by m-guberina's avatar m-guberina
Browse files

python tutorial should now look like something

parent 8d095d1e
No related branches found
No related tags found
No related merge requests found
## intro to packages
There are A LOT of them. I will cover only the popular ones which I personally used
that proved to be of high quality and usability.
Unfortunatelly, managing Python packages can be very messy.
However, most of the problems can be solved via compartmentalisation.
### Installing packages
We will cover 3 ways to install packages:
1. through your distributions package manager
2. pip
3. anaconda
There are also virtual environments, but I found conda + pip
to be the easiest way to get random python projects to work,
so I'm not covering it here.
The best way changes from year to year, but this has not failed me yet.
### numpy
Fast matrix operations.
**examples**: Show basic usage of what's below in ipython.
Content:
- wrappers around fast c code
- vectorization into real arrays
- arange
- linspace
- basic math (addition, powers, exponentials)
- matrix multiplication
- matrix inversion
- so much more in [numpy documentation](https://numpy.org/)
### scipy
Ready to use advanced math.
Content:
- linear algebra
- optimization
- regression
- so much more in [scipy documentation](https://scipy.org/)
**examples**
- show chalmers nonlin lab optimization example (just code and plot is ok)
- Bonus: a more detailed IK example (math first, then code, but very quickly)
### matplotlib
**examples**:
- plot a sin wave
- download and run something from the gallery
Content:
- plotting numpy arrays
- completely intuitive for basics, animations and GUI are a bit weird
- [matplotlib gallery] (https://matplotlib.org/stable/gallery/index.html)
Bonus: going far with matplotlib: own projects:
- basic animation with celluloid: ~/chalmers/SCS hw1 and hw2
- AR car: ~/chalmers/AR2/hw3/guberina_hw3
- manipulability_visualizer from ur_simple_control/visualize
Matplotlib animation is a bit involved. I will provide tutorial
only if there is demand for it.
The same goes for tkinter GUIs with embedded matplotlib.
### openCV
- open up the laptop camera: ~/programs/camera_no_lag.py
- show some basic transformations like grascale, ~/programs/camera_no_lag.py
- open up ip_webcam, and open then open it in opencv
- show classic object detection example in action ~/chalmers/HUMRO/HUMROgroup5/classic_cv_test
- show yolov4 in action HUMRO project, mention [yolo-v8](https://docs.ultralytics.com/)
- much more at [opencv documentation](https://docs.opencv.org/4.x/index.html)
### other noteworthy packages
- GUI - [tkinter]( https://tkdocs.com/), ex. previously shown in matplotlib manipulator_visualizer
- simbolic math - sympy, ex. calculate hessian: ~/chalmers/NONLIN/lab/simpy_lab1.py
- classic ML - [scikit-learn](https://scikit-learn.org/stable/index.html)
- deep learning - [pytorch](https://pytorch.org/)
- tables - [pandas](https://pandas.pydata.org/)
- deep learning object detection and more - [yolo-v8](https://github.com/ultralytics/ultralytics)
- classic control - [control](https://python-control.readthedocs.io/en/0.10.1/)
2.10. numpy - 1 video - do everything in the shell
- wrappers around fast c code
- vectorization into real arrays
- arange
- linspace
- basic math (addition, powers, exponentials)
- matrix multiplication
- matrix inversion
- many many more
2.11. matplotlib - plot a sin wave
- plotting numpy arrays
- completely intuitive for basics, can get weird otherwise
- show matplotlib gallery
- show chalmers SCS labs
- show manipulability_visualizer
- show AR car
2.12. openCV - 1 video just for this
- open up the laptop camera
- open up ip_webcam over LAN
- show some basic transformations like negative
- show classic object detection example in action
- show yolov4 in action HUMRO project, mention openpose
2.13. scipy - go over - 1 video and other libraries
- linear algebra
- optimization
- regression
- ...
- show chalmers nonlin lab optimization example (just code and plot is ok)
- show a more detailed IK example (math first, then code, but very quickly)
2.14. other noteworthy packages - just show websites
- tkinter - mention its shown use in manipulator_visualizer and hand detection
- sympy - example: calculate hessian: /home/gospodar/chalmers/NONLIN/lab/simpy_lab1.py
- scikit-learn for classic ML
- pytorch for neural networks
- pandas for tables (eats SQL, Excell, csv no problem)
- yolo-v8 - the end all be all of CNN based object detection
- control - classic control
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment