How to convert point cloud files in .xyz format to .bin format to make it kitti like? - point-clouds

I was trying to train a 3D object detection model called Complex YOLOv4 from kitti benchmark using my own dataset. Unfortunately this dataset comes with the 3D point cloud files in .xyz formatenter image description here and pretty much all the models tested in kitti benchmark used .bin point cloud files from the kitti dataset for training.
I tried to read the .xyz files from the code but it doesn't project the point clouds on BEVs. I was wondering how to convert the .xyz point cloud files into kitti like .bin files so that I can train any available 3D object detection model from the kitti benchmark?
I am attaching a snapshot of how the .xyz files are organised and the data they contain. It looks like the first 3 elements are representing the points coordinates (x, y, z) and 4th is the reluctance value r, fifth is probably the row or sequence number.

Related

Does image file type matter in terms of accuracy or speed when training/evaluating in machine learning?

I would like to know if the image file type matters at all in image classification using Keras, Tensorflow, or any other machine learning library. For example:
If I were to train using only JPG files, will the accuracy be significantly affected if I were to evaluate the model using only PNG files?
If so, will it be better to train using both JPG and PNG files so I can evaluate using both types?
Or does the image file type not matter at all?
The file type does not matter.
During training (and inference for that matter) images are converted into a tensors (you can think of this just as a multi dimensional array) where each pixel is represented by a small group of numbers (or a single number for black and white images).
Machine learning is performed on these tensors rather than the image itself so the original file format really doesn't matter.

Caffe - training autoencoder with image data/image label pairs

I am very unfamiliar with Caffe. My task is to train an autoencoder net on image pairs, given in .tif format, where one is a grayscale image of nerves, and the other is the corresponding binary mask which shows if a certain structure is present on the image or not. I have these in the same "train" folder. What I would like to accomplish, is a meaningful experiment with these images (segmentation, classification, it is not specified). My first problem is that I do not know how to feed the images into the net without an existing train.txt. Can I use the images directly, or another format like lmdb, hdf5 needed? Any suggestion is appreciated.
you can accomplish it with simple classification (existing like alexnet, googlenet, lenet). You can use only the binary mask or gray scale image and the class name to do this. Nvidia Digits is a good graphical tool to make the pair dataset and learning....
Please see this link:
https://developer.nvidia.com/digits

Camera calibration patterns

I would like to know if there is a process to generate camera calibration patterns.
We can use paint or any other graphic tool and set the precise measurements but then we need to hard-code the point positions or create a txt/xml file.
Is there a software that exports the data to a file that we can upload in our software.
What about 3D targets like boxes and/or cubes. Is there a method to generate the correct data points?
Cheers.
For 2D targets such as checkerboards, I used to do it like user469049 describes. Which was quite time consuming. In the end I gave up and created a web tool that does all of the leg work:
https://calib.io/pages/camera-calibration-pattern-generator
I'm using inkscape:
http://dominoc925.blogspot.co.uk/2012/06/create-camera-calibration-chess-board.html
I usually create a pdf file used to print and save files as LaTeX with PSTricks extensions.
The tex file has paths, so for a square it has a \moveto command to set the starting point and it has \line to command to set the next points.
In the dominoc925 example they define black and white squares but I just define the black squares to avoid repeated points.
I have a simple file loader in my code to get the points, just search for the \moveto and \line commands and workout the points from there.
For the 3D targets I treat each patter as one view because I don't have the tools to build a precise 3D target.
So instead of having different views of one patter like in the Matlab toolbox, I treat each detected pattern as a view.
In other words, if you have a 3D object then the target on each face is treated as a independent view.
There is probably a more professional way to do the job but this is my process :)
I hope this helps.

Generating a multipoint topojson file

I am trying to create a map layer using D3 and leaflet for displaying a large number of unique GPS data points. I created it using geoJSON and Leaflet but the performance was poor. I finally got Topojson installed and working, but I cannot get it to produce a Multipoint geometry, only Point geometry which does not shrink the file much. I have passed in a CSV with all the points and used to geoJson file but only get 70,000 point geometries instead of one Multipoint. What am I missing? Do I need to write the Topojson myself? Want to avoid this if possible.
TopoJSON won't help you in this case. To quote the website:
Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs.
As you have no line segments, there's no point in using TopoJSON -- it won't reduce the size of the file.
+1 What Lars said. Your best bet is probably to load the point data as a CSV using d3.csv()instead of a GeoJSON or TopoJSON, as it is much more compact. You can then loop over the data, adding each point to a layer group.
That said, 70,000 is a lot and your map is still probably going to be very slow. You might want to think about using something like PostGIS (or CartoDB for that matter) and request only those points that are visible in a given map state.

How to create Frustum in DXF format for Autocad?

I am trying to create a frustum using DXF file with my text editor, but unable to find any good solution or way to create it. If anyone knows and would be obliged to help me find a solution DXF file or an example, that would be a great help. Thank You
A frustum is a 3-dimensional figure. While the DXF file format does contain provisions for coordinates in the Z-direction(3rd dimension), you cannot use it to define a true solid model. There are 3DFACE and 3DSOLID entities available, but they do not give you solid model objects like the IGES or STEP file formats would.
That being said, you have a tremendously large task ahead of you to create a valid DXF file in a text editor. There is a huge amount of header information required in a DXF file for even the simplest shapes.
If you are serious about it, your best bet will be to start with a blank (no entities drawn) DXF file that has been created in a CAD package and use that as your base. Then you can add entities to it as needed. You will need the DXF file specification. I use the R2000 spec since it has all the needed functionality while still being backwards compatible with the largest number of systems.
If you are doing a conic frustum, you will need to investigate the ELLIPSE entity, and if you are doing a pyramidal frustum, you will need the LINE entity. Depending on the level of complexity you want and the version of the DXF spec that you work from, you can also use the SURFACE entity, but in a DXF file, this will just be represented as a series of lines forming a grid(polyface mesh).
You can also use the 3DFACE and 3DSOLID entities, but if you really want solid geometry, you're better off using a 3D file format as mentioned above.

Resources