Giter VIP home page Giter VIP logo

trackr-cnn's Introduction

TrackR-CNN

Code for the TrackR-CNN baseline for the Multi Object Tracking and Segmentation (MOTS) task.

Project website (including annotations)

https://www.vision.rwth-aachen.de/page/mots

Paper

MOTS: Multi-Object Tracking and Segmentation

Paul Voigtlaender, Michael Krause, Aljosa Osep, Jonathon Luiten, Berin Balachandar Gnana Sekar, Andreas Geiger and Bastian Leibe

https://www.vision.rwth-aachen.de/media/papers/mots-multi-object-tracking-and-segmentation/MOTS.pdf

mots_tools for evaluating results

https://github.com/VisualComputingInstitute/mots_tools

Running this code

Setup

You'll need to install the following packages (possibly more):

tensorflow-gpu pycocotools numpy scipy sklearn pypng opencv-python munkres

In particular, the code has been tested with Python 3.6.7 and Tensorflow 1.13.1 running on a single GTX 1080 Ti gpu. While there is experimental support for multi-gpu training through the "gpus" config flag, some users have reported problems with this, so we recommend using one gpu only.

Furthermore, you'll need the KITTI MOTS dataset, where we assume you have a folder /path/to/kitti_mots with subfolders /path/to/kitti_mots/images containing the input images (i.e. there exist subfolders /path/to/kitti_mots/images/0000, /path/to/kitti_mots/images/0001, ...) and /path/to/kitti_mots/instances (again with subfolders 0000, 0001, ...) containing the annotations.

Also, create the following directories for logs, model files etc. in the base directory of the repository:

mkdir forwarded models summaries logs

Pre-Trained Models

Pre-trained models can be downloaded here: https://omnomnom.vision.rwth-aachen.de/data/trackrcnn/

Folder structure and config flags

In the configuration files, you'll need to adjust the KITTI_segtrack_data_dir and load_init flags to point to the KITTI MOTS data directory and the path to the pretrained model, respectively. Logs, checkpoints and summaries are stored in the logs/, models/ and summaries/ subdirectories.

So all in all, your folder structure should look like this:

data/
- KITTI_MOTS/
-- train/
--- images/
---- 0000/
----- 000000.png
----- 000001.png
----- ...
---- 0001/
---- ...
--- instances/
---- 0000/
----- 000000.png
----- 000001.png
----- ...
---- 0001/
---- ...
models/
- conv3d_sep2/
-- conv3d_sep2-00000005.data-00000-of-00001
-- conv3d_sep2-00000005.index
-- conv3d_sep2-00000005.meta
- converted.data-00000-of-00001
- converted.meta
- converted.index 
...
main.py

So point KITTI_segtrack_data_dir to data/KITTI_MOTS/train/ and load_init to models/converted.

Training

In order to train a model, run main.py with the corresponding configuration file. For the baseline model with two separable 3D convolutions and data association with learned embeddings, use

python main.py configs/conv3d_sep2

Forwarding and tracking

Either first train your own model as described above, or download our model and extract the files into models/conv3d_sep2/

To obtain the model's predictions (we call this "forwarding") run:

python main.py configs/conv3d_sep2 "{\"task\":\"forward_tracking\",\"dataset\":\"KITTI_segtrack_feed\",\"load_epoch_no\":5,\"batch_size\":5,\"export_detections\":true,\"do_tracking\":false,\"video_tags_to_load\":[\"0002\",\"0006\",\"0007\",\"0008\",\"0010\",\"0013\",\"0014\",\"0016\",\"0018\",\"0000\",\"0001\",\"0003\",\"0004\",\"0005\",\"0009\",\"0011\",\"0012\",\"0015\",\"0017\",\"0019\",\"0020\"]}"

The json string supplied as an additional argument here overwrites the settings in the config file. Use video_tags_to_load to obtain predictions for specific sequences (in the example, all KITTI MOTS sequences are chosen). Output is written to the forwarded/ subdirectory.

The model predictions as obtained by the previous command are not yet linked over time. You can use the following command to run the tracking algorithm described in the paper and to obtain final results in the forwarded/ subdirectory which can be processed by the mots_tools scripts:

python main.py configs/conv3d_sep2
"{\"build_networks\":false,\"import_detections\":true,\"task\":\"forward_tracking\",\"dataset\":\"KITTI_segtrack_feed\",\"do_tracking\":true,\"visualize_detections\":false,\"visualize_tracks\":false,\"load_epoch_no\":5,\"video_tags_to_load\":[\"0002\",\"0006\",\"0007\",\"0008\",\"0010\",\"0013\",\"0014\",\"0016\",\"0018\"]}"

You can also visualize the tracking results here by setting visualize_tracks to true.

Tuning

The script for random tuning will find the best combination of tracking parameters on the training set and then evaluate these parameters on the validation set. This is how the results in the MOTS paper are obtained.

To use this script, run

python scripts/eval/segtrack_tune_experiment.py /path/to/detections/ /path/to/groundtruth/ /path/to/precomputed_optical_flow/ /path/to/output_file /path/to/tmp_folder/ /path/to/mots_eval/ association_type num_iterations

where /path/to/detections/ is a folder containing the model output on the training set (obtained by the forwarding command above); /path/to/mots_eval/ refers to the official evaluation script (link see above, clone the repository and supply the path here); association_type determines the method for associating detections into tracks and is either reid (using the association embeddings - use this if unsure!), mask (using mask warping), bbox_iou (using bounding box warping with median optical flow) or bbox_center (nearest neighbor matching); num_iterations is the number of random trials (1000 in the paper); /path/to/groundtruth/ refers to the instances or instances_txt folder containing the annotations (which you can download from the project website); /path/to/precomputed_optical_flow can usually be set to a dummy folder (it refers to optical flow for input images, which is used only for a few of the ablation experiments in the paper - namely when setting association_type to mask or bbox_iou but if you set it to something else, then the flow path is ignored); at /path/to/output_file, a file will be created containing the results of the individual tuning iterations, please make sure this path is writable; at /path/to/tmp_folder a lot of intermediate folders will be stored, you can delete these afterwards.

References

Parts of this code are based on Tensorpack (https://github.com/tensorpack/tensorpack/tree/master/examples/FasterRCNN) and RETURNN (https://github.com/rwth-i6/returnn/blob/master/Log.py).

Citation

If you use this code, please cite:

@inproceedings{Voigtlaender19CVPR_MOTS,
 author = {Paul Voigtlaender and Michael Krause and Aljosa Osep and Jonathon Luiten and Berin Balachandar Gnana Sekar and Andreas Geiger and Bastian Leibe},
 title = {{MOTS}: Multi-Object Tracking and Segmentation},
 booktitle = {CVPR},
 year = {2019},
}

License

MIT License

Contact

If you find a problem in the code, please open an issue.

For general questions, please contact Paul Voigtlaender ([email protected]) or Michael Krause ([email protected])

trackr-cnn's People

Contributors

ahnonay avatar jonathonluiten avatar pvoigtlaender avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trackr-cnn's Issues

How to set the file path

I am trying to use the KITTI_Segtrack dataset for training.
My current dataset path is "~/data/KITTI_MOTS/train/image_02"
Where should I put the annotation files ( "instance", "instance_txt" and "trackrcnn_detections" )?

How to set the file path, and dataset path?

Sorry, I got some very basic questions here. It's about the configration of this project. I read the readme, but still got these quetions.
In the config file, the MOT path is "MOTS_segtrack_data_dir":"/globalwork/krause/data/MOTS_challenge/train/".
The downloaded dataset is MOT17. Should I just put the train and test folder into MOTS_challenge?
And where should I put the trackrcnn_init folder into? If I use the MOT dataset, where should I put the following data into?

Images (hosted on original MOTChallenge webpage)
Annotations in png format
Annotations in txt format
TrackR-CNN detections

Problem when testing on my own data

@pvoigtlaender Hi, I have made a data set for hundreds pictures. And I have train for two days. When I test the picture in train data set, It works well. But when I test images not in train data sets,I met a lot of problem . The result of testing the image is no longer the original order.
e.g. the image 000037.jpg in forwarded/conv3d_sep2/vis/tracks/0000 folder is different from 000037.png in dataset/test/0000 folder(My test data path),Is this normal?
When testing,is this network reading pictures sequentially? or it is up to the network itself to decide which is the next frame?
I hope you can help me solve my confusion.

Problem with tracking part

Thanks for sharing.
I am interested in Hungarian algorithm mentioned in the paper. Which python file is the algorithm wrote in? I didn't find it.
Thanks for someone helping me.

Support for custom dataset

Hi
Just wondering if the current version of Track RCNN allows us to use it for training of a custom dataset?

Training interruption problem

I have 2 GPU , I had a mistake when I started training. Has anyone encountered the same error? How can I resolve it?
..........
starting training
I1203 10:05:56.184263 140066288711488 Log.py:34] starting training
8 / 39544 {loss: 0.78003} elapsed 45.849170207977295
I1203 10:06:42.033973 140066288711488 Log.py:34] 8 / 39544 {loss: 0.78003} elapsed 45.849170207977295
...
24 / 39544 {loss: 1.0996} elapsed 14.851442575454712
I1203 10:07:15.374087 140066288711488 Log.py:34] 24 / 39544 {loss: 1.0996} elapsed 14.851442575454712
2019-12-03 10:07:19.467476: W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: indices[15] = [15, 1] does not index into param shape [16,1,4]
..........
2019-12-03 10:07:19.674195: W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: indices[15] = [15, 1] does not index into param shape [16,1,4]
Traceback (most recent call last):
File "/home/lab509/miniconda3/envs/mots/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1356, in _do_call
return fn(*args)
File "/home/lab509/miniconda3/envs/mots/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1341, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/lab509/miniconda3/envs/mots/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1429, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[15] = [15, 1] does not index into param shape [16,1,4]
[[{{node trainnet/tower_gpu_0/frcnn_5/GatherNd}}]]

I can't see visualized result when running the demo called conv3d_sep2

I first extract the three files conv3d_sep2-00000005* to models/conv3d_sep2/
And ran this command in my terminal:

python3 main.py configs/conv3d_sep2 "{\"task\":\"forward_tracking\",\"dataset\":\"KITTI_segtrack_feed\",\"load_epoch_no\":5,\"batch_size\":5,\"export_detections\":true,\"do_tracking\":false,\"video_tags_to_load\":[\"0002\",\"0006\",\"0007\",\"0008\",\"0010\",\"0013\",\"0014\",\"0016\",\"0018\",\"0000\",\"0001\",\"0003\",\"0004\",\"0005\",\"0009\",\"0011\",\"0012\",\"0015\",\"0017\",\"0019\",\"0020\"]}"

Then ran this:

python3 main.py configs/conv3d_sep2 "{\"build_networks\":false,\"import_detections\":true,\"task\":\"forward_tracking\",\"dataset\":\"KITTI_segtrack_feed\",\"do_tracking\":true,\"visualize_detections\":true,\"visualize_tracks\":false,\"load_epoch_no\":5,\"video_tags_to_load\":[\"0002\",\"0006\",\"0007\",\"0008\",\"0010\",\"0013\",\"0014\",\"0016\",\"0018\"]}"

but failed to visualize the tracking results.
Or I might have misunderstood your meanings in README.md.

here are some warnings from tensorflow

W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
and this
2019-12-12 23:23:20.885099: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected

hope you could help.

some questions about conv3D

1.I see the old_order of layers.If order,dropout -> conv -> batchnorm -> activation -> pool, can you tell me why you chage the order?
2.There are two conv3D in your networks. Are these two networks connected in series or in parallel?

Inference issue: All empty detections and tracking_data files

Hi,

I ran inference on the KITTI test set using the pretrained weights (I didn't train any model). Command line:

python main.py configs/conv3d_sep2 "{\"build_networks\":false,\"import_detections\":true,\"task\":\"forward_tracking\",\"dataset\":\"KITTI_segtrack_feed\",\"do_tracking\":true,\"visualize_detections\":true,\"visualize_tracks\":true,\"load_epoch_no\":5,\"video_tags_to_load\":[\"0002\",\"0006\",\"0007\",\"0008\",\"0010\",\"0013\",\"0014\",\"0016\",\"0018\"]}"
All the .txt files under ./forwarded/conv3d_sep2/detections/ and ./forwarded/conv3d_sep2/tracking_data/ generated are empty files with 0 bytes. What am I missing?

Thanks.

Problem with making datasets

Hi,Track R-CNN is an amazing network. I still have some confusion about the production of data sets in the paper.
"In the beginning, we annotate (as polygons) two segmentation masks per object in the considered dataset.1 The refinement network is first trained on all manually created masks and afterwards fine-tuned individually for each object. "
Why per object need two segmentation masks? What do these two masks label for?

About Annotation in Validation sets

I follow the DAVIS data format to change the ImageSets of KITTIMOTS like
image

Then I find first frame 000000.png in video 0006 has no foreground label value. all values are zero. And this may lead to unsupevised problem that cannot go through the VOS semi-supervised task based on 1st frame.

Is it reasonable to modify your valid.txt with videos that 1st frame absolutely has foreground ?

Or

I hesitated how to use this valid videos to test other method. deleting unavailable frames at the beginning or I will use all annotations without foreground at the beginning,and this may be unfair for evaluation.

Probelm about using 16bit single channel image as input

Dear author, I have tried make own dataset using 16bit single channel depth image as input, these pictures are then rendered into color pictures for annotation. I use the depth image and the annotation to train track r-cnn. I have change img = tf.image.decode_image(img_data, channels=3) to img = tf.image.decode_image(img_data, channels=1) in Dataset.py. The network can be trained normally. But when testing there are some error:

Forwarding video...
0000
1 / 108
Traceback (most recent call last):
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/main.py", line 39, in <module>
    tf.app.run(main)
  File "/home/ubuntu/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/main.py", line 35, in main
    engine.run()
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/core/Engine.py", line 93, in run
    TrackingForwarder(self).forward()
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/forwarding/tracking/TrackingForwarder.py", line 92, in forward
    super(TrackingForwarder, self).forward()
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/forwarding/RecurrentDetectionForwarder.py", line 51, in forward
    self._forward_video(n_timesteps, tag)
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/forwarding/tracking/TrackingForwarder.py", line 146, in _forward_video
    recurrent_state, measures, extractions = self._forward_timestep(recurrent_state)
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/forwarding/RecurrentDetectionForwarder.py", line 94, in _forward_timestep
    extraction_keys=self._extraction_keys)
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/core/Trainer.py", line 151, in validation_step
    self.validation_step_number)
  File "/media/ubuntu/SSD/TrackR-CNN/TrackR-CNN-master/core/Trainer.py", line 188, in _step
    res = self.session.run(ops, feed_dict=feed_dict, options=run_options, run_metadata=run_metadata)
  File "/home/ubuntu/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 950, in run
    run_metadata_ptr)
  File "/home/ubuntu/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1149, in _run
    str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (480, 640) for Tensor 'images_placeholder_0:0', which has shape '(?, ?, 3)'

I don't know where the problem is, I hope someone can help me.Thanks very much.

How to test and train on MOT dataset?

I have successfully test on kitti dataset, and now I want to train and test on MOTS dataset, I use the following commands to test on MOTS dataset,

{"task":"forward_tracking","dataset":"MOTS_segtrack_feed","load_epoch_no":5,"batch_size":5,"export_detections":true,"do_tracking":false,MOTS_segtrack_data_dir: /home/echo/a_project/TrackR-CNN/kitti_mots/mot/mot17/test/,"video_tags_to_load":[MOT17-01-DPM]}"

But get this error,

Traceback (most recent call last):
File "/home/echo/a_project/TrackR-CNN/main.py", line 39, in
tf.app.run(main)
File "/home/echo/anaconda3/envs/MOTS/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/echo/a_project/TrackR-CNN/main.py", line 22, in main
assert os.path.exists(config_path), config_path
AssertionError: {"task":"forward_tracking","dataset":"MOTS_segtrack_feed","load_epoch_no":5,"batch_size":5,"export_detections":true,"do_tracking":false,MOTS_segtrack_data_dir: /home/echo/a_project/TrackR-CNN/kitti_mots/mot/mot17/test/,"video_tags_to_load":[MOT17-01-DPM]}

The data path in My config.py is like this :
mots7
mots8

And this is my dataset tree:
kitti_mots/mot/mot17/test
kitti_mots/mot/mot17/train

mots9

I don't know where the problem is ,can you help me please? Thanks a lot ! @pvoigtlaender @ahnonay

Problem when training with multiple gpu

When training on my own dataset and I set "gpus": 2 in conv3d_sep2,it raises ValueError.
ValueError: Index out of range using input dim 0; input has only 0 dims for 'trainnet/strided_slice_10' (op: 'StridedSlice') with input shapes: [], [1], [1], [1] and with computed input tensors: input[3] = <1>.
But when setting "gpus": 1 ,it works well.
If I want to use multiple GPU training, do I need to modify other parameters?

AssertionError

When I run the command:

python main.py configs/conv3d_sep2

I get the following error:

Traceback (most recent call last):
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/main.py", line 32, in
tf.compat.v1.app.run(main)
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/venv/lib/python3.7/site-packages/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/venv/lib/python3.7/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/venv/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/main.py", line 27, in main
engine = Engine(config)
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/core/Engine.py", line 41, in init
name="trainnet")
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/network/Network.py", line 16, in init
self.input_tensors_dict = dataset.create_input_tensors_dict(self.batch_size)
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/datasets/Dataset.py", line 278, in create_input_tensors_dict
self._load_inputfile_lists()
File "/Users/joshgoldman/PycharmProjects/MultiObjectTrackingAndSegmentation/datasets/Dataset.py", line 260, in _load_inputfile_lists
assert len(l) > 0
AssertionError

Some Questions about Training and Validation.

Thank you all so much for sharing this project. I would really appreciate your help.

I used TrackR-CNN with the pre-trained model “trackrcnn_init” to test on videos from overhead-located cameras recording people. However, on my overhead camera videos, the model detects few people. So I want to re-train it on ground truth sequences from my videos. Thus, I have some questions to do this task.

  1. What software can I use in order to generate more ground truth images to annotate people and get these annotations in the .png format as you mention in the project’s link?

  2. Would annotations in a .jpg format help with training speed due to the size of the jpg files?

  3. How many FPS and which ImageResolution is recommended to use before doing new annotated video frames to train TrackR-CNN?

  4. Once I get the annotated sequences, the paper mentions that MOTSChallenge was trained in a leaving-one-out fashion. So, as the paper mentions, instead, the KITTY MOTS was trained in a sort of 80% trained and 20%validation manner. Hence, which part of the code would allow me to switch between a leaving-one-out fashion and an 80% effort training way if I wanted to train a new dataset on whichever of two those ways?

  5. After training during some predefined epochs, i.e., epochs=10, does the program update automatically the pre-trained-weight files after reaching this predefined amount let's say in a save_best_only way? This is because I am using Google Colab and I can just train it for 12 hours. (What would be your recommendation for doing this?)

  6. I am a little confused about the validation process. After training, shall I post-validate my new trained model using the mots_tools on a new validation dataset to see the results in sMOTSA MOTSA and MOTSP? Or how should it be?

  7. Which image resolution is recommended for doing training and validation? In the config file there are different resolutions for training and for validation.

  8. In Table-5 of the paper, it shows that “GT Boxes (tight) + MG” has better results than “TrackR-CNN (ours)”. I do not know what the differences are between them. Please, could you elaborate on it a little bit more in detail?

MOTS test image display problems

Hi ! Thanks for your sharing. I have tested MOTS dataset sucessfully, but the image can not show the mask correctly, the vis/track image as follow:
11

I think the problem is caused by the test image size,and I have changede the configs/conv3d_sep2 as :
"input_size_val":[1080,1920]

but no works.
so what should I do to get track images with correct masks?

Loading image issues

Hi, thank you for sharing your source code.
I met some issues when I tried to inference tracking result on the KITTI dataset.
I met issues with the following steps:

  1. Configuring load_init and KITTI_segtrack_data_dir in configs/conv3d_sep2:

"load_init": "/home/gehen/PycharmProjects/MOTS/TrackR-CNN/models/trackrcnn_init",
"KITTI_segtrack_data_dir": "/home/gehen/Downloads/images/tracking/MOTS/KITTY/training/image_02/",

  1. Configuring DEFAULT_PATH in datasets/KITTI/segtrack/KITTI_segtrack.py as described in : #4

DEFAULT_PATH = "/home/gehen/Downloads/images/tracking/MOTS/KITTY/training/image_02/"

  1. Copying provided detections to forwarded/con3d_sep2/detections/5.

  2. Run python main.py configs/conv3d_sep2"{\"build_networks\":false,\"import_detections\":true,\"task\":\"forward_tracking\",\"dataset\":\"KITTI_segtrack_feed\",\"do_tracking\":true,\"visualize_detections\":true,\"visualize_tracks\":false,\"load_epoch_no\":5,\"video_tags_to_load\":[\"0002\",\"0006\",\"0007\",\"0008\",\"0010\",\"0013\",\"0014\",\"0016\",\"0018\"]}"

  3. Though obtaining tracking results in forwarded/con3d_sep2/tracking_data, but all the visualization failed, which reports assert len(det_boxes) == len(imgs).

where the imgs is an empty list.
It seems that the tracker cannot load images in the inference, and remains an empty image list in the visualization.

What might be the problem that fails the tracker in loading images? Moreover, the tracker also fails to generate detection results in step (3) with the empty image list.

run the main.py

Hello, thank for your works. I try to run the main.py in pycharm, but the code exits like this:
image
I am sure that I have installed those packages mentioned, but I can't run the code successfully!
Can you tell me why? Thank you very much!

How to train with initialized weights?

Hi, thanks for sharing the great work with us! I had a question that how to train the model with your initialized pretrained weights(called "trackrcnn_init" in your shared link)?
Here's what I modified in the conv3d_sep2 config:
I set the "model" to be "converted" and the "load_init" to be "models/converted" and put the pretrained weights into the "load_init" folder. But it reports that: couldn't find 'checkpoint' file or checkpoints in given directory models/converted/.
Are there any errors in the setting? Thanks!

There are some places that don't understand about the reid parameters.

Thanks for sharing, I tried to train my own dataset with TrackRCNN, and the tracking effect is not very good. I doubt that the reid_euclidean_offset_car series parameter needs to be fine-tuned. But I don't understand how the values of these parameters are determined. I hope your guidance.Thank you! @pvoigtlaender
"association_threshold_car": 0.8165986526897969, "keep_alive_car": 4, "reid_euclidean_offset_car": 8.810218833503743, "reid_euclidean_scale_car": 1.0090931467228708,

Question about pre-train model

I am confused about the weight in which part of network will be load when I use the pre-train model named trackrcnn_init. And when training, the weight of whole network will change gradually or just the part which don't load pre-train model?
Thanks for answering question.

Problem about ground truth picture in instances

I download both .png and .txt format of ground truth of annotations,but I am confused about the .png format annotation.First ,I find human shadow in picture and a lot of brighter rectangle in picture too ,what is this rectangle? Second, if using .png format annotation,when I label a person in frame T and the same person in frame T+1, How to label the two instance annotations for the same ID. How is this information reflected in the picture?

I hope someone can solve my confusion,Thanks.

Meet some problem when training on MOT dataset

I want to train on MOT dataset , but I found the instance.txt only have 0002,0005,0009,0011

motrain1

But the train directory has following images, Need I change their directory name to 0002,0005,0009,0011?

motrain2

How to deal with other directories please? Thanks !

A bug when training with MOTSchallenge dataset

I trained the model on MOTSchallenge dataset and test the model with my own videos. However, the model detected cars in my video and recognize them as pedestrians. I do not want to detect cars, just pedestrians. So how can I do that? Thank you!

Meeting some problem when tuning

Hello, thank you for your sharing!
When I try to run tuning, I found there was something unclear in README.
/path/to/precomputed_optical_flow/
/path/to/output_file
/path/to/tmp_folder/
/path/to/mots_eval/
association_type
num_iterations
Could you explain these paths more in detail?
thank you, very much!

How to train my dataset with TrackRCNN?

Thanks for sharing, I downloaded your data set and tested it, but I don't quite understand how your data set is made. Is it feasible to convert to txt format with labelme or labelimg? How to train my own data set? @pvoigtlaender

trianing with pre-model meet a problem.(checkpoint file couldn't find)

thank you share the excellent work with us, I have meeted a problem when running the code with pretrained model. I have changed the "load_init" point to the path to the pretrained model, and I sure it no problem with the path. but it still throw an error that
" Couldn't find 'checkpoint' file or checkpoints in given directory /home/phm/TrackR-CNN/models".
image

The trackrcnn_init.zip only contained three files, "XX.meta", "XX.index" and "XX.data-00XXX".
image
I don't know if this file is missing, or other problem caused the error. follow is the picture of error description.
image
list_variables(filename) called a function load_checkpoint(checkpoint_dir), and the later can't find checkpoint file.

Problem with segmentation result

WechatIMG1
As the picture show,the left of mask is straight when testing kitti dataset, and when I testing my own model,this situation also often appears,I'm sure the edge of my annotation is smooth,but the edge of testing result always straight. What should I do to avoid this happening?

how to decide threshold?

hello, Thanks for sharing.
I try to train my own datasets. training is done perfect. its also give good loss, but in prediction part i am confuse to set threshold because in my dataset classes are different. they are not car or pedestrian. so how can i decide threshold?
@pvoigtlaender

AssertionError

When I run python main.py configs/conv3d_sep2
I get the following error:

Traceback (most recent call last):
File "main.py", line 39, in
tf.app.run(main)
File "/Users/joshgoldman/PycharmProjects/TrackR-CNN/venv/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/Users/joshgoldman/PycharmProjects/TrackR-CNN/venv/lib/python3.7/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/Users/joshgoldman/PycharmProjects/TrackR-CNN/venv/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "main.py", line 34, in main
engine = Engine(config)
File "/Users/joshgoldman/PycharmProjects/TrackR-CNN/core/Engine.py", line 41, in init
name="trainnet")
File "/Users/joshgoldman/PycharmProjects/TrackR-CNN/network/Network.py", line 16, in init
self.input_tensors_dict = dataset.create_input_tensors_dict(self.batch_size)
File "/Users/joshgoldman/PycharmProjects/TrackR-CNN/datasets/Dataset.py", line 270, in create_input_tensors_dict
self._load_inputfile_lists()
File "/Users/joshgoldman/PycharmProjects/TrackR-CNN/datasets/Dataset.py", line 254, in _load_inputfile_lists
assert len(l) > 0
AssertionError

Input size of the MOTchallenge dataset

Thanks for sharing! I'm trying to train on the MOTSchallenge dataset. The four sequences in the MOTSchallenge dataset have different image sizes, so what is the "input_size_train" in the config of MOTSchallenge dataset? When I validate the MOTSchallenge dataset, is the "input_size_val" of the four sequences different? @pvoigtlaender

Meeting a lot of problem when testing data.

Hi,everyone, I'm new in Multi-Object tracking and I want test one of MOT17 data(such as MOT17-01-DPM in test),I meet a lot of problem.

  1. I just use 000001.jpg, 000002.jpg,..... in MOT17-01-DPM/img1, is this ok? Do I still need to do something else with the dataset?
  2. Where I set the test data file path ,I can't find it.
  3. python main.py configs/conv3d_sep2 "{"task":"forward_tracking","dataset":"MOTS_segtrack_feed","load_epoch_no":5,"batch_size":5,"export_detections":true,"do_tracking":false,"video_tags_to_load":["MOT17-01-DPM"]}", Is there any problem in this command? And what does "video_tags_to_load" use for?
    I have been confused for many days, I sincerely hope that someone can answer my question.
    Thanks very much.

where to find the results and to visualize them

Thanks for your work!
I have run the code successfully I think ,

`Forwarding video...
0018
Loading forwarded detections from file...
Done.
Loading images for visualization...
Done.
Time for tracking (s): 6.499499977508094e-05 FPS for tracking including forwarding: 0.0
Exporting tracking results
Visualizing tracks
Time for forwarding (s): 0.0002299799998581875 FPS for forwarding (wo. tracking): 0.0

Process finished with exit code 0`

BUT where to find the results? And how can I visulize the results, I dont know ,it will help me a lot if you can tell me,thanks!

Meeting a problem when running the code

I have imported the KOT training data and instances into "/data/KITTI_MOTS/train/" and have changed the "KITTI_segtrack_data_dir" in config.

However, when I run the command " python main.py configs/conv3d_sep2", the error appears as follows:
"""
Traceback (most recent call last):
File "main.py", line 39, in
tf.app.run(main)
File "/home/lemonweed/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "main.py", line 34, in main
engine = Engine(config)
File "/home/lemonweed/2019summer/MOTS/TrackR-CNN-master/core/Engine.py", line 41, in init
name="trainnet")
File "/home/lemonweed/2019summer/MOTS/TrackR-CNN-master/network/Network.py", line 16, in init
self.input_tensors_dict = dataset.create_input_tensors_dict(self.batch_size)
File "/home/lemonweed/2019summer/MOTS/TrackR-CNN-master/datasets/Dataset.py", line 268, in create_input_tensors_dict
self._load_inputfile_lists()
File "/home/lemonweed/2019summer/MOTS/TrackR-CNN-master/datasets/Dataset.py", line 252, in _load_inputfile_lists
assert len(l) > 0
AssertionError
"""
I try my best to figure out where is wrong but I failed. Even if I import no training data, the same error appears.

The related code in your project is as follows:
It is in the Dataset.py
if self.inputfile_lists is not None:
return
self.inputfile_lists = self.read_inputfile_lists()
assert len(self.inputfile_lists) > 0
for l in self.inputfile_lists:
assert len(l) > 0

It seems that l = 0 and then the error occurred. But I totally cannot solve it.
I really hope that you can help me. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.