Comments (4)
Lots of bottlenecks unfortunately. Detection can run in almost any batch size, especially on GPUs the higher the better. But there's two issues with that, you need quite a bit of memory and frames need to arrive quickly enough. So far, that's not really given.
I've tried offloading reading and writing frames to separate processes, but surprisingly that didn't help much - the additional overhead, at least on my system, ate the gains from parallelisation. So far, the best approach I could find was to massively speed up reading/writing frames. #32 contains a very much WIP draft, but the performance improvements are already quite large.
Basically, it makes sure that extracting frames, reading frames and detection (given a high enough batch size) all attempt to saturate the given resources. As long as each of the steps use near 100% of your CPU, it doesn't matter if they're properly pipelined or not. So far, that has lead to really nice results on my laptop at least - up to 20fps for inference at 360p, with small weights. Maybe not the most realistic workload, but it's my default test case...
I still have to fix a lot of things there though, and check how this works when using a GPU.
TL;DR: Increasing the batch size and improving frame extraction should help.
from dashcamcleaner.
hm, I found when using CPU that increasing batchsize does not really help, rather the opposite.
with batch_size==5:
the dips are where the progress-bar updates, so when the batch of frames is saved and the next are loaded...
so even then the detection does not use more cpu% :-/
from dashcamcleaner.
almost makes me think having two batches run detections in parallel would be beneficial, however weird that may sound.
since one batch of detections does not utilize the cpu well.
from dashcamcleaner.
Hmm.. it's not perfect for me, but much better. batch size 16:
I'll do some profiling soon.
from dashcamcleaner.
Related Issues (20)
- `ipython` missing in requirements.txt HOT 1
- weight error HOT 2
- Output Video has stand image HOT 17
- error with `TypeError: unsupported operand type(s) for /: 'tuple' and 'int'` HOT 3
- allow other file types in the gui
- Many errors a noob can't solve ^^ HOT 7
- frame_memory option HOT 10
- errors HOT 14
- CLI did not use GPU HOT 3
- DashcamCleaner hangs at 0% when using AMD GPU HOT 5
- Wie รffnen? HOT 4
- Google Coral for speed up HOT 1
- Macbook M1 Max und PyTorch HOT 2
- How to use GPU on Desktop Version? HOT 7
- Performance Compare GUI Settings HOT 3
- Where is the feature of bluring previous frames in case of missed detections implemented? HOT 13
- No audio in output file when audio stream at index 1 HOT 3
- generate_training_data.py broken dependency requirements HOT 1
- threshold option not working HOT 7
- cli.py videos freeze HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dashcamcleaner.