Skip to content

Commit

Permalink
Update throughput.py and README
Browse files Browse the repository at this point in the history
  • Loading branch information
hellozhuo committed Oct 17, 2021
1 parent 03412dd commit c708597
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ by
[Qi Tian](https://scholar.google.com/citations?user=61b6eYkAAAAJ&hl=en),
[Matti Pietikäinen](https://en.wikipedia.org/wiki/Matti_Pietik%C3%A4inen_(academic)) and
[Li Liu](http://lilyliliu.com/)\*\*
(\* Authors have equal contributions, \*\* Corresponding author). \[[arXiv](https://arxiv.org/abs/2108.07009)\]
(\* Authors have equal contributions, \*\* Corresponding author). \[[arXiv](https://arxiv.org/abs/2108.07009), [youtube](https://www.youtube.com/watch?v=jEAh_4wm1UU)\]

The writing style of this code is based on [Dynamic Group Convolution](https://github.com/zhuogege1943/dgc).

If you are interested in our work, please consider citing [our paper](pdc.bib).

## Running environment

Training: Pytorch 1.9 with cuda 10.1 and cudnn 7.5 in an Ubuntu 18.04 system <br>
Expand Down
15 changes: 15 additions & 0 deletions pdc.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@inproceedings{su2021pdc,
title={Pixel Difference Networks for Efficient Edge Detection},
author={Su, Zhuo and Liu, Wenzhe and Yu, Zitong and Hu, Dewen and Liao, Qing and Tian, Qi and Pietikainen, Matti and Liu, Li},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
pages={5117--5127},
year={2021}
}

@inproceedings{su2019bird,
title={BIRD: Learning Binary and Illumination Robust Descriptor for Face Recognition.},
author={Su, Zhuo and Pietik{\"a}inen, Matti and Liu, Li},
booktitle={British Machine Vision Conference},
pages={102},
year={2019}
}
6 changes: 4 additions & 2 deletions throughput.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,16 @@ def test(test_loader, model, args):

model.eval()

end = time.time()
end = time.perf_counter()
torch.cuda.synchronize()
for idx, (image, img_name) in enumerate(test_loader):

with torch.no_grad():
image = image.cuda() if args.use_cuda else image
_, _, H, W = image.shape
results = model(image)
end = time.time() - end
torch.cuda.synchronize()
end = time.perf_counter() - end
print('fps: %f' % (len(test_loader) / end))


Expand Down

0 comments on commit c708597

Please sign in to comment.