Coder Social home page Coder Social logo

captaineven / fairmotvehicle Goto Github PK

View Code? Open in Web Editor NEW
183.0 183.0 39.0 27.53 MB

A fork of FairMOT used to do vehicle MOT.用于跟踪车辆的多目标跟踪, 自定义数据进行单类别多目标实时跟踪

License: MIT License

Shell 0.62% Python 99.38%

fairmotvehicle's Introduction

Hi there 👋

fairmotvehicle's People

Contributors

captaineven 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

fairmotvehicle's Issues

what are these models?

from the model_down_script:

ctdet_coco_dla_2x.pth is your baseline fully trained on UA-DETRAC?

What is all_dla34.pth?

Thanks!

problem of 'gen_labels_detrac.py'

gen_dot_train_file(data_root='/home/ubuntu/data/dataset',
rel_path='/DETRAC/images/train',
out_root='/home/ubuntu/FairMOTVehicle/src/data')

clean_train_set(img_root='/home/ubuntu/data/dataset/DETRAC/images/train',
label_root='/home/ubuntu/data/dataset/DETRAC/labels_with_ids/train')

Erase file first and write cfg to get error

Therefore, need to change the position of both functions.

请问将代码修改为多类别多目标跟踪需要修改那一个部分?

您好,
感谢您对MOT任务做出的贡献。我是一个MOT新手,阅读了FairMot源码的issues发现您在下方进行了回复,将源码改成了多类别跟踪。
我想请教下,除了更改update函数以外,还需要更改哪些内容呢?在FairMot源码的基础上修改可以吗?
谢谢,祝好

A problem on training Re-Id heatmap with a vehicle dataset

Hello
How are you?
Thanks for contributing this project.
I am going to train a model for tracking objects like cars.
I have a question about Re-Id.
In general, I think that there may be many "same cars" in a same position or different positions.
Here "same cars" means that they have same shape, color and brand although they are different objects.
In fact, I looked such cases in several vehicle datasets such as KITTI or DETRAC.
We assign different ids to these "same cars" to train Re-Id heatmap.
In this case, can the model for Re-Id converge?
I think that the model may converge in case to train persons rather than cars.
But what about training cars?
I doubt this point.
Thanks

训练detrac数据集的时候验证集曲线出了一些问题

85981141-48b3a100-ba16-11ea-9a29-e7d0413ad43d
85981178-536e3600-ba16-11ea-8810-cd4c0eeb0b62
85981196-59fcad80-ba16-11ea-8952-7e25c3bef9d8
您好,不好意思打扰了。我修改了一下代码,使代码能在每跑完一个epoch后画出验证集的曲线。但是我发现验证集的曲线有一些问题。heatmap的验证集曲线没有下降反而直接增加了。我训练集验证集的比例为8:1。是因为验证集的数据分布和训练集太像了,所以还没有训练完一个epoch就发生了过拟合?我不确定到底是什么问题,您能帮忙解答一下吗?万分感谢。

How did you train the network?

Hi, I'm really interested in fairmot work which is absolutely done perfectly. Could you please share a bit of the detail about how you trained the model for cars? Like did you freeze the body of the network and train only the heads? Did you train id head? How many images did you have for the training data? Did you encounter any generalization errors? I'll be so glad if you can answer my questions.

ua-detrac

hi,
could you show me the file director of the ua-detrac dataset. I don't know how to arrange the directory of the dataset

No param id.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.

你好!
我按照你readme中步骤去训练,报了如下错误:
`/home/ckq/anaconda3/envs/FairMOT/bin/python /home/ckq/git/FairMOTVehicle/src/train.py
Using tensorboardX
Fix size testing.
training chunk_sizes: [1, 2, 1]
The output will be saved to /home/ckq/git/FairMOTVehicle/src/lib/../../exp/mot/default
Setting up data...
Dataset root: /home/ckq/data/even/dataset

dataset summary
OrderedDict([('detrac', 5952.0)])
total # identities: 5952
start index
OrderedDict([('detrac', 0)])

heads: {'hm': 1, 'wh': 2, 'id': 128, 'reg': 2}
opt:
Namespace(K=128, arch='dla_34', batch_size=4, cat_spec_wh=False, chunk_sizes=[1, 2, 1], conf_thres=0.4, data_cfg='../src/lib/cfg/detrac.json', data_dir='/home/ckq/data/even/dataset', dataset='jde', debug_dir='/home/ckq/git/FairMOTVehicle/src/lib/../../exp/mot/default/debug', dense_wh=False, det_thres=0.3, down_ratio=4, exp_dir='/home/ckq/git/FairMOTVehicle/src/lib/../../exp/mot', exp_id='default', fix_res=True, gpus=[0, 5, 6], gpus_str='0, 5, 6', head_conv=256, heads={'hm': 1, 'wh': 2, 'id': 128, 'reg': 2}, hide_data_time=False, hm_weight=1, id_loss='ce', id_weight=1, img_size=(1088, 608), input_h=1088, input_res=1088, input_video='../videos/test3.mp4', input_w=608, is_debug=True, keep_res=False, load_model='../models/ctdet_coco_dla_2x.pth', lr=0.0001, lr_step=[20, 27], master_batch_size=1, mean=None, metric='loss', min_box_area=200, mse_loss=False, nID=5952, nms_thres=0.4, norm_wh=False, not_cuda_benchmark=False, not_prefetch_test=False, not_reg_offset=False, num_classes=1, num_epochs=30, num_iters=-1, num_stacks=1, num_workers=8, off_weight=1, output_format='video', output_h=272, output_res=272, output_root='../results', output_w=152, pad=31, print_iter=0, reg_loss='l1', reg_offset=True, reid_dim=128, resume=False, root_dir='/home/ckq/git/FairMOTVehicle/src/lib/../..', save_all=False, save_dir='/home/ckq/git/FairMOTVehicle/src/lib/../../exp/mot/default', seed=317, std=None, task='mot', test=False, test_mot15=False, test_mot16=False, test_mot17=False, test_mot20=False, track_buffer=30, trainval=False, val_intervals=10, val_mot15=False, val_mot16=False, val_mot17=False, val_mot20=False, vis_thresh=0.5, wh_weight=0.1)
Creating model...
loaded ../models/ctdet_coco_dla_2x.pth, epoch 230
Skip loading parameter hm.2.weight, required shapetorch.Size([1, 256, 1, 1]), loaded shapetorch.Size([80, 256, 1, 1]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Skip loading parameter hm.2.bias, required shapetorch.Size([1]), loaded shapetorch.Size([80]). If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
No param id.0.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
No param id.0.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
No param id.2.weight.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
No param id.2.bias.If you see this, your model does not fully load the pre-trained weight. Please make sure you have correctly specified --arch xxx or set the correct --num_classes for your own dataset.
Starting training...`

请问我是哪里错了?

num_class

你好,请问下如果我直接用DETRAC数据集来训练模型的话,num_class是设置为1还是4呢?我看数据集官网是细分了4中车辆类别,不过我最后只想把训练好的模型用来做车辆跟踪,不需要区分具体的车型,这种情况的话是不是num_class=1就可以了呢?
另一方面我是考虑如果直接设置为1是不是会影响模型训练的效果呢?我看label文件中类别id是从0到3的,所以能否给个建议?
感谢!

CityPerson.zip is corrupted

Dear author,

The file downloaded from google drive is corrupted.

> unzip Citypersons.zip
error: invalid zip file with overlapped components (possible zip bomb)

Is this the converted dataset from DETRAC? If so, I can download it from there. If not, could you please share the description of the dataset? Thanks!

The docs.google.com/us?xxx in model_down_script.sh cannot be accessed

(pytorch) root@d04c53c86778:~/workspace/ws_wcc/my_docker/fairMotVehicle/FairMOTVehicle# ./model_down_script.sh
mkdir: cannot create directory 'models': File exists
--2023-10-17 14:28:24-- https://docs.google.com/uc?export=download&id=1pl_-ael8wERdUREEnaIfqOV_VF2bEVRT
Resolving docs.google.com (docs.google.com)... 185.60.216.169, 2a03:2880:f136:83:face:b00c:0:25de
Connecting to docs.google.com (docs.google.com)|185.60.216.169|:443...

I tried accessing the connection directly in the browser and it couldn't be opened either.

UA-DETARC测试集上面的指标

您好,请问一下这个模型训练完后您是否在测试集上测了MOTA等指标
结果如何,能否参考一下多谢!

Missing label.txt in DETRAC

I am facing this error while attempting to train on DETRAC dataset:

(FairMOT)**********:~/FairMOT_ws/FairMOTVehicle/src$ python3 train.py --task mot --exp_id all_dla34 --gpus 0,1 --batch_size 8 --load_model '../models/all_dla34.pth' --data_cfg '../src/lib/cfg/detrac.json' --num_epochs 10 --lr 1e-5
Using tensorboardX
Fix size testing.
training chunk_sizes: [4, 4]
The output will be saved to  /home/*****/FairMOT_ws/FairMOTVehicle/src/lib/../../exp/mot/all_dla34
Setting up data...
Dataset root: /home/*****/FairMOT_ws/Datasets/
Traceback (most recent call last):
  File "train.py", line 135, in <module>
    run(opt)
  File "train.py", line 48, in run
    transforms=transforms)
  File "/home/*****/FairMOT_ws/FairMOTVehicle/src/lib/datasets/dataset/jde.py", line 460, in __init__
    lb = np.loadtxt(lp)
  File "/home/*****/.conda/envs/FairMOT/lib/python3.7/site-packages/numpy/lib/npyio.py", line 981, in loadtxt
    fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
  File "/home/*****/.conda/envs/FairMOT/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 269, in open
    return ds.open(path, mode, encoding=encoding, newline=newline)
  File "/home/*****/.conda/envs/FairMOT/lib/python3.7/site-packages/numpy/lib/_datasource.py", line 623, in open
    raise IOError("%s not found." % path)
OSError: /home/*****/FairMOT_ws/Datasets/DETRAC/labels_with_ids/train/MVI_39761/img1/img00542.txt not found.
 

the gen_label_detrac.py maybe has something wrong code!

On line 48 to line 54

The following is my modified code:


                        dst_f_path = os.path.join(dst_img1_dir + y)

                        if not os.path.isfile(dst_f_path):

                            shutil.copy(y_path, dst_img1_dir)

                            print('{} cp to {}'.format(y, dst_img1_dir))

                        else:

                            print('{} already exists.'.format(dst_f_path))

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.