Helper Scripts for the Didi Challenge (Team: Transformers!!)
These Scripts use Python2.x
New Addition: Feature_extraction_from_velo_points.ipynb
New Addition: npy2images.py
- Extracts a sample image from a bag file in the same directory and prints out a summary and information about the bag file.
- Prints a lot of information on the file's PointCloud2 Topic and a sample of the data to terminal.
- Run from the command line as follows without brackets and parenthesis:
python2 rosbag_cooking.py [file_name.bag]
- Extracts all the images from a given bag file to a folder in the directory of a given name in grayscale or RGB colour.
- Run from the command line as follows without brackets and parenthesis:
python2 bag2images.py [bag_file_name] [new_images_folder_name] ["c" or "g" for colour or gray]
- Extracts the images in the bag in video format in grayscale or RGB clolour.
- Run from the command line as follows without brackets and parenthesis:
python2 bag2video.py [file_name.bag] [fps] ["c" or "g" for colour or gray]
- Extracts the PointCloud2 frames in the bag file as an array of frames(topic messages).
- Each member of the output array contains an array of the X - Y - Z - Intensity-Ring values in this order.
- Run from the command line as follows without brackets and parenthesis:
python2 bag2pointcloud_xyzir.py [file_name.bag]
- The output file can be loaded using:
numpy.load([npy_file_path])
- Extracts the PointCloud2 frames in the
.NPY
file as an array of frames values (X,Y,Z,Intensity,Ring). - Plots a bird's-eye view of a sample frame and saves it to an image at 1400dpi.
- Note! VTK and MayaVI need to be on compatible versions with each other.
- Extracts all the xy axis (bird's-eye view) images from a given bag file to a folder in the directory.
- Run from the command line as follows without brackets and parenthesis:
python2 bag2velo_xy_images.py [bag_file_name] [int_dpi]
- A Notebook exploring how to extract features from the velodyne data provided
- Extracts all the points form the
.NPY
file convert to a top-down image, save it and a folder of the images cropped into chuncks of 230x230 to manually label the car/notCar data from the images
- Run from the command line as follows without brackets and parenthesis:
python2 npy2images.py [npy_file_name]
- Converts the topics and types of the rosbag into csv format.