Git Product home page Git Product logo

header-vec's Introduction

Rust Computer Vision

Rust CV is a project to implement computer vision algorithms in Rust.

What is computer vision

Many people are familiar with covolutional neural networks and machine learning in computer vision, but computer vision is much more than that. One of the first things that Rust CV focused on was algorithms in the domain of Multiple-View Geometry (MVG). Today, Rust now has enough MVG algorithms to perform relatively simple camera tracking and odometry tasks. Weakness still exists within image processing and machine learning domains.

Goals

Here are some of the domains of computer vision that Rust CV intends to persue along with examples of the domain (not all algorithms below live within the Rust CV organization, and some of these may exist and are unknown):

To support computer vision tooling, the following will be implemented:

header-vec's People

Contributors

makoconstruct avatar vadixidav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

makoconstruct

header-vec's Issues

Get performance within at least 2x of std::vec

In #2, it was identified that HeaderVec performs several times slower than Vec. While this isn't too unusual, it would be great to go faster. Now that we have benchmarks (see #3), we can use these to push the performance further. Getting within at least 2x the performance of Vec should be reasonable, especially considering that HeaderVec is mostly concerned with reducing random accesses in graphs, so memory latency/random lookup is typically a greater concern. However, there is no reason that the implementation can't go faster than it is today, so this should be done.

This issue is to track performance increases until we get to within a reasonable margin (2x) of Vec. This target can be moved if necessary.

Isn't the initial capacity insufficient whenever `align_of::<H> >= align_of::<T>`?

Let's say we have HeaderVec<u32, u8>::new(7u32). new allocates an inital capacity of 1, so from the looks of things, that would get us an allocation layout of

alloc::alloc::Layout::from_size_align(
    1, // Self::elems_to_mem_bytes(capacity),
    4, // cmp::max(mem::align_of::<H>(), mem::align_of::<T>()),
)

Which, the documentation seems to suggest would round the allocation up to 4 bytes. This is only enough to store the header val. The remaining u8 in that the vector is supposed to be able to hold wouldn't actually be allocated for?

The problem is that the size of the memory layout has to be bigger than the capacity of the vec, but they're being treated as if they're the same.

This would only affect the last size_of::<H> - (size_of<T> % size_of<H>) elements of the vec, or something like that, and I'd guess they'd often be kept protected from being messed with by other allocations by the allocator rounding up the allocation cell to contain more than is needed, so it's possible that the consequences of this have not been noticed yet.

I'll try to fix this... after lunch

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.