prophesee-ai / prophesee-automotive-dataset-toolbox

A set of Python scripts to evaluate the Automotive Datasets provided by Prophesee

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About dataset_visualization.py

xxyll opened this issue · comments

commented

Hi,
I have a question about 'dataset_visualization.py'. If the file only visualize initial input datasets? If I try to object detection on GEN1, and want to visualize the results (include label and score..), how can I modify the code?
I don't know if I expressed myself clearly. Looking forward to your reply, thank you!

Hello @xxyll ,
yes, the visualization script is to display the input data.
If you want to try detection on some data, then you have to use our SDK which contains a Detection and Tracking sample.

commented

@lbristiel-psee Thank you for your reply, I'm looking at reference webpage you provided.

I used my own SNN to do object detection experiment on GEN1 dataset, and obtained pre trained model in .ckpt format.
I want to visualize output results with bounding boxes, label, score, can I also use the code in SDK/SDK pro package which indicated by the 'Inference Pipeline of Detection using Python'?

commented

I logged in PROPHESEE and received response about downloading Metavision SDK, includes “For Linux Ubuntu 20.04 and Ubuntu 22.04”. But the linux core I used is CentOS, does this mean I cannot use Metavision SDK?

Sorry to ask you so many questions, thank you!

can I also use the code in SDK/SDK pro package which indicated by the 'Inference Pipeline of Detection using Python'?

yes, you should be able to do so.

But the linux core I used is CentOS, does this mean I cannot use Metavision SDK?

The download links are to get pre-compiled binaries for a limited set of platform. If you want to use our SDK on CentOS then you will have to use OpenEB and compile it yourself (see https://docs.prophesee.ai/stable/installation/linux_openeb.html) but OpenEB does not contain all the modules (see https://docs.prophesee.ai/stable/modules.html) and the Machine LEarning module with D&T tracking is not included. If you want the source code of ML module then you have to acquire SDK PRO (see https://docs.prophesee.ai/stable/modules.html#metavision-sdk-packaging). So short term for you, maybe the easiest path would be to get access to an Ubuntu machine and use our binaries.

commented

Thanks, I'll try according to your suggestion.

commented

Hi @lbristiel-psee,

I downloaded SDK421 on windows. I want to add code samples to my own object detection code, and try implementing visualization functionality.

I plan to use checkpoint what I have trained before to run "metavision/sdk/ml/python_samples/export_detector" first, cause I see the official website says it will output: model.ptjit (the model) and info_ssd_jit.json (the hyperparameters used during training). Then take these two results as input for "metavision/sdk/ml/python_samples/detection_and_tracking_pipeline", this may output videos to meet my needs.

But I run $ python export_detector.py ./pretrained/vgg-16/ckpt-od-gen1-vgg-16/gen1-epoch=49-train_loss=0.4271.ckpt ./output , it occur the following error:

屏幕截图 2023-07-11 201925

How can I solve it? Is it my checkpoint doesn't match the code?(My experiment was on GEN1 Automotive Detection dataset).

Thank you so much!

Hello,

our export code is indeed expecting only some architectures with a certain number of keys. In your case, our code is not finding the key "feature_extractor" but some others are probably also missing. So you could try to analyze our code to see what keys are expected but maybe this is not worth the effort, because going back to your initial need/question, if you what you are looking for is to vizualize detection results, then you should probably look at this sample: https://docs.prophesee.ai/stable/samples/modules/ml/vizu_gt_det.html

As mentioned in the doc, to use the vizu_gt_det sample, you will need

  • a recording file ( --record_file): an event-based input file in DAT or RAW format.
  • GT Bbox: a NPY file containing GT Bbox.
  • Detection Bbox: a NPY file containing detection Bbox.

So if you were able to do detection with your own code/script, you could try to generate detection results that are compatible with the one vizu_gt_det expects as input.

Hope this helps,
Laurent

Hi, @lbristiel-psee

I'd like to use the 'red_event_cube_all_classes.ckpt' and 'driving_sample.raw' provided on your webpage first to ensure that the code runs smoothly. https://docs.prophesee.ai/stable/samples/modules/ml/export_detector.html#chapter-samples-ml-export-detector
But when I run python export_detector.py ./pretrained/red_event_cube_all_classes.ckpt ./output --verification_sequence ./driving_sample.raw, it occur the following error:
屏幕截图 2023-07-25 132124

Why did it report an error like this?

Thank you so much!

Hello @xxyll
sorry for the delay to come back to you, during the summer the teams are smaller and we have less bandwidth to answer questions. I just tried the command that failed for you and it works OK for me. Were you able to make it work in the meantime? If no, make sure that driving_sample.raw is in the current folder from where you launch the command.
hope this helps,
Laurent for Prophesee support