Giter VIP home page Giter VIP logo

siamfc-pytorch's People

Contributors

strangerzhang 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

siamfc-pytorch's Issues

TypeError: a bytes-like object is required, not 'NoneType'

Traceback (most recent call last):
File "bin/train_siamfc.py", line 9, in
Fire(train)
File "/home/lab/anaconda3/envs/siamfc/lib/python3.6/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/home/lab/anaconda3/envs/siamfc/lib/python3.6/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/home/lab/anaconda3/envs/siamfc/lib/python3.6/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "/home/lab/cym/siamfc/SiamFC-PyTorch/siamfc/train.py", line 94, in train
for i, data in enumerate(tqdm(trainloader)):
File "/home/lab/anaconda3/envs/siamfc/lib/python3.6/site-packages/tqdm/_tqdm.py", line 1017, in iter
for obj in iterable:
File "/home/lab/anaconda3/envs/siamfc/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/lab/anaconda3/envs/siamfc/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: Traceback (most recent call last):
File "/home/lab/anaconda3/envs/siamfc/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/lab/anaconda3/envs/siamfc/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/lab/cym/siamfc/SiamFC-PyTorch/siamfc/dataset.py", line 62, in getitem
exemplar_img = self.imread(exemplar_name)
File "/home/lab/cym/siamfc/SiamFC-PyTorch/siamfc/dataset.py", line 35, in imread
img_buffer = np.frombuffer(img_buffer, np.uint8)
TypeError: a bytes-like object is required, not 'NoneType'

这一步安装不了

ng/models$ python bin/convert_pretrained_model.pypython bin/convert_pretrained_model.py
python3: can't open file 'bin/convert_pretrained_model.pypython': [Errno 2] No such file or directory

How to solve the LMDB error in SiamFC training

I'm following your instructions to run to python bin/train_siamfc.py --gpu-id [gpu_id] --data-dir path/to/data/ILSVRC2015_VID_CURATION. But the system reported an error.
lmdb error ;path/to/data/ILSVRC2015_VID_CURATION
How to solve this problem?
Thank you very much

create_dataset.py pool error

I am facing error at line 67 in create_dataset.py
Please help me to solve the issue.
ValueError: invalid literal for int() with base 10: 'a\ILSVRC2015_train_00000000\000000'

AUC

请问Note中你提到的AUC中是怎样获得的?计算AUC的代码在哪个文件?

question about computing displacement in interpolation response

Hi StrangerZhang:
Thanks for your wonderful code. I have a question about computing displacement in interpolation response. Can you please tell me the intuition of this computation? Why does the code need to minus half of interp_response_sz? Thanks in advance!

About train code

Thanks to the pytorch version of siamesefc. Can you provide the completed code to generate the OTB results?

Question about the relation betwwen 'disp_response_interp' and 'disp_response_input'

Hi, Zhang (maybe :) ), I have a question that troubles me for two days.
In the tracking phase, the response heatmap is upsampled by a ratio (response_up_stride = 16), which increases the resolution of the heatmap to 272. This resolution 272 is bigger than the resolution of the input instance patch (255). And the equation
'disp_response_input = disp_response_interp * config.total_stride / config.response_up_stride'
is aimed to map the response location to the input instance (of network input size 255) location, but it is quite hard to understand why
' * config.total_stride / config.response_up_stride' ?
Maybe
disp_response_input = disp_response_interp * config.instance_size/ config.disp_response_interp
is more understandable as a linear mapping?

Thanks @StrangerZhang

the porblem of training the model

L:\Anaconda\envs\py3\python.exe E:/Gavin/SiamFC-PyTorch-master/siamfc/train.py
0%| | 0/6650 [00:00<?, ?it/s]Traceback (most recent call last):
File "E:/Gavin/SiamFC-PyTorch-master/siamfc/train.py", line 135, in
train(0 , 'E:\Gavin\data\ILSVRC_VID_CURATION')
File "E:/Gavin/SiamFC-PyTorch-master/siamfc/train.py", line 101, in train
for i, data in enumerate(tqdm(trainloader)):
File "L:\Anaconda\envs\py3\lib\site-packages\tqdm_tqdm.py", line 1005, in iter
for obj in iterable:
File "L:\Anaconda\envs\py3\lib\site-packages\torch\utils\data\dataloader.py", line 501, in iter
return _DataLoaderIter(self)
File "L:\Anaconda\envs\py3\lib\site-packages\torch\utils\data\dataloader.py", line 289, in init
w.start()
File "L:\Anaconda\envs\py3\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "L:\Anaconda\envs\py3\lib\multiprocessing\context.py", line 212, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "L:\Anaconda\envs\py3\lib\multiprocessing\context.py", line 313, in _Popen
return Popen(process_obj)
File "L:\Anaconda\envs\py3\lib\multiprocessing\popen_spawn_win32.py", line 66, in init
reduction.dump(process_obj, to_child)
File "L:\Anaconda\envs\py3\lib\multiprocessing\reduction.py", line 59, in dump
ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'Transaction'>: attribute lookup Transaction on builtins failed
Traceback (most recent call last):
File "", line 1, in
File "L:\Anaconda\envs\py3\lib\multiprocessing\spawn.py", line 106, in spawn_main
exitcode = _main(fd)
File "L:\Anaconda\envs\py3\lib\multiprocessing\spawn.py", line 116, in _main
self = pickle.load(from_parent)
EOFError: Ran out of input

How to download ILSVRC2015-VID?

I have met some trouble in downloading the ILSVRC2015-VID dataset from the command line on Ubuntu. I have found 85.7G of the link from the Internet. Is it really so large? Can someone share how you downloaded ILSVRC2015-VID? I would be grateful if you could answer me.

Problem of training

I'm following your instructions to run to python bin/train_siamfc.py --gpu-id [gpu_id] --data-dir path/to/data/ILSVRC2015_VID_CURATION. But the system reported an error.
Traceback (most recent call last):
File "bin/train_siamfc.py", line 9, in
Fire(train)
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 366, in _Fire
component, remaining_args)
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "E:\tensorflow\SiamFC-PyTorch-master\siamfc\train.py", line 62, in train
db = lmdb.open(data_dir+'.lmdb', readonly=True, map_size=int(50e9))
lmdb.Error: E:/tensorflow/ILSVRC_VID_CURATION.lmdb: ϵͳ�Ҳ���ָ����·����
How to solve this problem?
Thank you very much

How to get the auc

Hi Mr.Zhang,
I trained the model 30 epoches and used the code in https://github.com/bilylee/tracker_benchmark you provide to produce the result on OTB100, and I got aveCoverage and aveErrCenter. The following is my result. But I don't know how to get the auc. I saved the predicted boxes and groundtruth boxes and calculate the auc myself and get 0.62+, but I think it's a little too high. So I wanna if the code you provide can produce auc?
Thanks a lot!
All.json
{"name": "ALL", "desc": "All attributes", "tracker": "SiameseFC", "evalType": "OPE", "seqs": ["Basketball", "Biker", "Bird1", "Bird2", "BlurBody", "BlurCar1", "BlurCar2", "BlurCar3", "BlurCar4", "BlurFace", "BlurOwl", "Board", "Bolt", "Bolt2", "Box", "Boy", "Car1", "Car2", "Car24", "Car4", "CarDark", "CarScale", "ClifBar", "Coke", "Couple", "Coupon", "Crossing", "Crowds", "Dancer", "Dancer2", "David", "David2", "David3", "Deer", "Diving", "Dog", "Dog1", "Doll", "DragonBaby", "Dudek", "FaceOcc1", "FaceOcc2", "Fish", "FleetFace", "Football", "Football1", "Freeman1", "Freeman3", "Freeman4", "Girl", "Girl2", "Gym", "Human2", "Human3", "Human4-2", "Human5", "Human6", "Human7", "Human8", "Human9", "Ironman", "Jogging-1", "Jogging-2", "Jump", "Jumping", "KiteSurf", "Lemming", "Liquor", "Man", "Matrix", "Mhyang", "MotorRolling", "MountainBike", "Panda", "RedTeam", "Rubik", "Shaking", "Singer1", "Singer2", "Skater", "Skater2", "Skating1", "Skating2-1", "Skating2-2", "Skiing", "Soccer", "Subway", "Surfer", "Suv", "Sylvester", "Tiger1", "Tiger2", "Toy", "Trans", "Trellis", "Twinnings", "Vase", "Walking", "Walking2", "Woman"], "overlap": 66.20537032522891, "error": 2.833591675153366, "overlapScores": [0.5926672927432785, 0.6744523158948802, 0.4758998916413733, 0.7696486706086082, 0.6853726089480511, 0.8345670514668277, 0.844032160931591, 0.8213972449066869, 0.8405619493081518, 0.8062361033658137, 0.8204389268634588, 0.44990766176914604, 0.5834594717187838, 0.5628299575581555, 0.6798351199956547, 0.7882560429522064, 0.805657077100189, 0.866769542199004, 0.8205198622192008, 0.846973290787438, 0.8637282909664755, 0.6275478765070535, 0.5131748615738081, 0.5803322245017029, 0.7265976675636683, 0.7794657551593479, 0.739760754058129, 0.6790682336800818, 0.7631618448786447, 0.742207866456886, 0.6405737645381154, 0.7975168491398508, 0.5263560801177612, 0.7363679925157307, 0.2904404740180546, 0.46867412460127506, 0.8303155589968413, 0.752400038255508, 0.6498460887560017, 0.7986218254166496, 0.7542083477596558, 0.6784146701449878, 0.7368269421615777, 0.6891616611951438, 0.7760366223898383, 0.6501801447403859, 0.47673670854190947, 0.7006798567188974, 0.5828177138544047, 0.7290218543301457, 0.6550681776431247, 0.5288280893804834, 0.7346839910533725, 0.6836821045300154, 0.6572003238157712, 0.5220306511186218, 0.6867237389837799, 0.7921275938393707, 0.41105993190160506, 0.7373981448108902, 0.6432348524025262, 0.7242144985219909, 0.7201011901991452, 0.3321892925673771, 0.6123389674336884, 0.8006784428872289, 0.6324850519694831, 0.8158914906985878, 0.8364380255459771, 0.5259386992791598, 0.803522424177653, 0.5554464910640086, 0.7228794573578582, 0.6273276580504706, 0.6462245831256584, 0.6919191339772083, 0.7782396990217818, 0.7396258994334471, 0.4509718189024295, 0.6255163033100344, 0.6170985834230858, 0.5448690373978851, 0.44765854738988825, 0.44215251029207453, 0.5160523555364676, 0.3255587346427622, 0.7807546842787755, 0.5973884179473172, 0.8286922892630049, 0.7472081492641974, 0.5316698896855354, 0.4845309321917454, 0.5754776107639107, 0.574880852519549, 0.6305495126856653, 0.6732596158125619, 0.5628371975785968, 0.7222802154172178, 0.6133800988493966, 0.4453594267695019], "errorNum": [5.1448275862068975, 5.352112676056338, 8.480392156862745, 0.6060606060606061, 0.14970059880239522, 0.013477088948787063, 0.0, 0.0, 0.0, 0.0, 0.03169572107765452, 8.753581661891118, 9.857142857142858, 5.665529010238908, 1.8776916451335057, 0.016611295681063124, 0.0, 0.0, 0.06211180124223602, 0.0, 3.0279898218829517, 2.9365079365079367, 5.148305084745762, 2.027491408934708, 0.07142857142857142, 6.146788990825688, 0.08333333333333333, 1.1527377521613833, 0.0, 0.06666666666666667, 3.1210191082802545, 0.148975791433892, 5.515873015873016, 0.0, 8.883720930232558, 6.062992125984252, 0.0, 0.1472107438016529, 1.858407079646018, 0.7074235807860262, 0.0, 1.958128078817734, 0.14705882352941177, 2.446958981612447, 6.961325966850829, 1.891891891891892, 6.656441717791411, 0.0, 2.6148409893992937, 0.2, 1.7333333333333334, 4.445893089960887, 0.3102836879432624, 9.80565371024735, 2.39880059970015, 5.624123422159888, 1.1237373737373737, 0.0, 9.53125, 0.1639344262295082, 4.457831325301205, 0.32573289902280134, 0.19543973941368076, 9.262295081967213, 1.3418530351437699, 5.476190476190476, 3.727544910179641, 3.7851809304997133, 0.0, 5.300000000000001, 0.006711409395973154, 3.597560975609756, 0.0, 1.9500000000000002, 1.02711157455683, 1.3820731096644967, 0.0, 0.22792022792022792, 9.6448087431694, 1.0625, 2.1149425287356323, 3.65, 7.251585623678647, 5.856236786469344, 8.641975308641975, 8.316326530612244, 0.05714285714285714, 1.8882978723404256, 4.5396825396825395, 0.4684014869888476, 3.531073446327684, 4.986301369863014, 3.284132841328413, 4.274193548387097, 3.936731107205624, 1.843220338983051, 3.6162361623616235, 0.04854368932038834, 4.1, 7.051926298157454], "successRateList": [0.8595669326499507, 0.8495732291636107, 0.8434232708936849, 0.8385026946620563, 0.8311043763146222, 0.821872587672512, 0.8099617917635625, 0.796378620064285, 0.7772042551701906, 0.749087954064562, 0.7166408324846634, 0.6748470123776762, 0.6208589850543295, 0.5562877195214879, 0.4729130216766844, 0.37404198625994994, 0.2552092146084533, 0.14111520018622783, 0.05399497417744243, 0.010378141850024452, 0.0]}

question about the cosine_window

您好,在resize之后的响应图上添加余弦窗抑制边缘突出中心,为什么是加法,不是乘法呢???
response_map = (1 - config.window_influence) * response_map +
config.window_influence * self.cosine_window???
这里用的加法,为什么不是乘法,乘上一个余弦窗???

when running demo, ground_rect.txt?

why need ground_rect.txt in video_dir when running demo?
can provide a sample of ground_rect.txt?
In addition, ground_rect.txt only need label of first frame, or label of all frames?
Thank you!

about how to test the model

Sorry to interrupt u, i got some confussion about how to test my model(.pth),so can u give me some advice?

question about the regression target

It seems that the random crop is applied to the search image. However, the regression target is still the same in the training phase. Could you please tell me the reason? Thanks.

create_dataset.py

Hi, I try to run bin/create_dataset.py, while it says:
0%| | 0/4417 [00:00<?, ?it/s]multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\multiprocessing\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "E:\tensorflow\SiamFC-PyTorch-master\bin\create_dataset.py", line 20, in worker
key=lambda x:int(x.split('/')[-1].split('.')[0]))
File "E:\tensorflow\SiamFC-PyTorch-master\bin\create_dataset.py", line 20, in
key=lambda x:int(x.split('/')[-1].split('.')[0]))
ValueError: invalid literal for int() with base 10: 'ILSVRC2015_VID_train_0000\ILSVRC2015_train_00000000\000000'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "bin/create_dataset.py", line 73, in
Fire(processing)
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 366, in _Fire
component, remaining_args)
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "bin/create_dataset.py", line 65, in processing
functools.partial(worker, output_dir), all_videos), total=len(all_videos)):
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\tqdm_tqdm.py", line 1022, in iter
for obj in iterable:
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\multiprocessing\pool.py", line 735, in next
raise value
ValueError: invalid literal for int() with base 10: 'ILSVRC2015_VID_train_0000\ILSVRC2015_train_00000000\000000'

I downloaded the ILSVRC2015_VID and set the dir. It shows again. Is it related to pytorch version? Thank you.

batchsize=8

I found that batchsize has a great influence on the results. Is 8 the optimal solution you got from experimenting?

请问这个问题怎么解决

您好,在运行您的代码的时候,出现了如下错误:
File "/home/wenxiao/code/siamfc/SiamFC-PyTorch/siamfc/alexnet.py", line 77, in forward
score = F.conv2d(instance, self.exemplar, groups=4)
RuntimeError: Given groups=4, expected weight to be at least 4 at dimension 0, but got weight of size 3 256 6 6 instead
请问如何解决呢?

how to determine the value num_per_epoch?

Thanks for your exellent contribution. It seems that the training samples in an epoch (as your defined 53200) is far less than the annotated object in the whole VID dataset. So in an epoch, the code only utilise a small amount of data? Thanks.

different alex net and output-channel?

I found it in file alexnet.py, Line31 nn.Conv2d(384, 256, 3, 1, groups=2) .
The output - channel is 256, and it should be 128, did the author change it or I'm wrong?
or it is some special things?
PLEASE HELP ME !!
I'm so confused!

about image process

The training pictures in the article are cropped with bbox as the center, but this part is not included in your program.

请问这个问题怎么解决

File "/home/xxc/miniconda3/envs/torch18/lib/python3.8/site-packages/torch/tensor.py", line 621, in array
return self.numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

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.