dafny
OpenCV
Our great sponsors
dafny | OpenCV | |
---|---|---|
30 | 195 | |
2,641 | 74,965 | |
1.5% | 1.6% | |
9.7 | 9.9 | |
4 days ago | 1 day ago | |
C# | C++ | |
GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dafny
- Candy – a minimalistic functional programming language
-
Lean4 helped Terence Tao discover a small bug in his recent paper
Code correctness is a lost art. I requirement to think in abstractions is what scares a lot of devs to avoid it. The higher abstraction language (formal specs) focus on a dedicated language to describe code, whereas lower abstractions (code contracts) basically replace validation logic with a better model.
C# once had Code Contracts[1]; a simple yet powerful way to make formal specifications. The contracts was checked at compile time using the Z3 SMT solver[2]. It was unfortunately deprecated after a few years[3] and once removed from the .NET Runtime it was declared dead.
The closest thing C# now have is probably Dafny[4] while the C# dev guys still try to figure out how to implement it directly in the language[5].
[1] https://www.microsoft.com/en-us/research/project/code-contra...
[2] https://github.com/Z3Prover/z3
[3] https://github.com/microsoft/CodeContracts
-
The Deep Link Equating Math Proofs and Computer Programs
I don't think something that specific exists. There are a very large number of formal methods tools, each with different specialties / domains.
For verification with proof assistants, [Software Foundations](https://softwarefoundations.cis.upenn.edu/) and [Concrete Semantics](http://concrete-semantics.org/) are both solid.
For verification via model checking, you can check out [Learn TLA+](https://learntla.com/), and the more theoretical [Specifying Systems](https://lamport.azurewebsites.net/tla/book-02-08-08.pdf).
For more theory, check out [Formal Reasoning About Programs](http://adam.chlipala.net/frap/).
And for general projects look at [F*](https://www.fstar-lang.org/) and [Dafny](https://dafny.org/).
-
In Which I Claim Rich Hickey Is Wrong
Dafny and Whiley are two examples with explicit verification support. Idris and other dependently typed languages should all be rich enough to express the required predicate but might not necessarily be able to accept a reasonable implementation as proof. Isabelle, Lean, Coq, and other theorem provers definitely can express the capability but aren't going to churn out much in the way of executable programs; they're more useful to guide an implementation in a more practical functional language but then the proof is separated from the implementation, and you could also use tools like TLA+.
-
Programming Languages Going Above and Beyond
> I think we can assume it won't be as efficient has hand written code
Actually, surprisingly, not necessarily the case!
If you'll refer to the discussion in https://github.com/dafny-lang/dafny/issues/601 and in https://github.com/dafny-lang/dafny/issues/547, Dafny can statically prove that certain compiler branches are not possible and will never be taken (such as out-of-bounds on index access, logical assumptions about whether a value is greater than or less than some other value, etc). This lets you code in the assumptions (__assume in C++ or unreachable_unchecked() under rust) that will allow the compiler to optimize the codegen using this information.
The language (Dafny): https://github.com/dafny-lang/dafny
Dafny is a verification-ready programming language. As you type in your program, Dafny's verifier constantly looks over your shoulder, flags any errors, shows you counterexamples, and congratulates you when your code matches your specifications. When you're done, Dafny can compile your code to C#, Go, Python, Java, or JavaScript (more to come!), so it can integrate with your existing workflow.
-
What are the current hot topics in type theory and static analysis?
Most of the proof assistants out there: Lean, Coq, Dafny, Isabelle, F*, Idris 2, and Agda. And the main concepts are dependent types, Homotopy Type Theory AKA HoTT, and Category Theory. Warning: HoTT and Category Theory are really dense, you're going to really need to research them.
-
What I've Learned About Formal Methods in Half a Year
I'm not sure if the author is here, or if my comment attempt was successful. So, can I suggest you take a look at a third leg of the formal methods stool?
If you are familiar with C, check out Frama-C (https://frama-c.com/) and the WP and RTE plugins. The approach is based on Tony Hoare and EWD's axiomatic semantics (https://en.wikipedia.org/wiki/Hoare_logic). It does not have a good memory management story, as far as I know, but is very good for demonstrating value correctness (RTE automatically generates assertions for numeric runtime errors, for example) and many memory errors.
If you are familiar with Ada, check out SPARK (https://www.adacore.com/about-spark), which is similar to Frama-C but has a much better interface in the AdaCore GNAT toolkit and IDE.
Both work similarly: Assertions in normal Ada or C code as well as the code itself are translated into SMT statements and fed to a SMT solver to find counterexamples---errors.
I have some blog posts from several years ago about Frama-C:https://maniagnosis.crsr.net/tags/applied%20formal%20logic.h... (And I really should get back into it; it's a lot of fun.)
If you are not familiar with Ada or C, Dafny (https://dafny.org/) is another option based on .NET and devoleped at Microsoft. It seems nigh-on perfect for this approach. (The language uses a garbage collector.) At the time I was looking, there was little documentation on Dafny, but that seems to have improved.
-
Thoughts on proof assistants?
But I suspect that will improve (they're all very new projects). I'm also keeping an eye on Dafny which looks pretty neat and avoids the "oh sorry we don't support traits" issue.
-
What is the toughest concept to understand and implement in .NET according to you?
However, if you want the full-fledged powerful code contacts back, you have to go outside C#. The closest you'll get is Dafny. It is a spec language that compiles to C#.
OpenCV
-
Exploring Open-Source Alternatives to Landing AI for Robust MLOps
Data analysis involves scrutinizing datasets for class imbalances or protected features and understanding their correlations and representations. A classical tool like pandas would be my obvious choice for most of the analysis, and I would use OpenCV or Scikit-Image for image-related tasks.
-
Image segmentation in huggingface
You'll need to plot the predictions. There are a few open source tools to do that, supervision is one you can use (https://github.com/roboflow/supervision) and opencv is another common option (https://github.com/opencv/opencv)
-
NodeJS: Blurring Human Faces in Photos
The OpenCV4NodeJs A.I. library provides an interface for calling OpenCV routines in NodeJS.
- NodeJS - Ofuscando rostos humanos em fotos
- SIMD Everywhere Optimization from ARM Neon to RISC-V Vector Extensions
- VidCutter: A program for lossless video cutting
-
Looking to recreate a cool AI assistant project with free tools
- [ OpenCV](https://opencv.org/) instead of YoloV8 for computer vision and object detection
I came across a very interesting [project]( (4) Mckay Wrigley on Twitter: "My goal is to (hopefully!) add my house to the dataset over time so that I have an indoor assistant with knowledge of my surroundings. It’s basically just a slow process of building a good enough dataset. I hacked this together for 2 reasons: 1) It was fun, and I wanted to…" / X ) made by Mckay Wrigley and I was wondering what's the easiest way to implement it using free, open-source software. Here's what he used originally, followed by some open source candidates I'm considering but would love feedback and advice before starting: Original Tools: - YoloV8 does the heavy lifting with the object detection - OpenAI Whisper handles voice - GPT-4 handles the “AI” - Google Custom Search Engine handles web browsing - MacOS/iOS handles streaming the video from my iPhone to my Mac - Python for the rest Open Source Alternatives: - [ OpenCV](https://opencv.org/) instead of YoloV8 for computer vision and object detection - Replacing GPT-4 is still a challenge as I know there are some good open-source LLms like Llama 2, but I don't know how to apply this in the code perhaps in the form of api - [DeepSpeech](https://github.com/mozilla/DeepSpeech) rather than Whisper for offline speech-to-text - [Coqui TTS](https://github.com/coqui-ai/TTS) instead of Whisper for text-to-speech - Browser automation with [Selenium](https://www.selenium.dev/) instead of Google Custom Search - Stream video from phone via RTSP instead of iOS integration - Python for rest of code I'm new to working with tools like OpenCV, DeepSpeech, etc so would love any advice on the best way to replicate the original project in an open source way before I dive in. Are there any good guides or better resources out there? What are some pitfalls to avoid? Any help is much appreciated!
-
[Question] I'd like to find out about how the x, y, w, h values retrieved by detectMultiScale() (for the rectangle boundary during face detection) and how it is calculated in the Haar Cascade OpenCV library. Does anyone know where I can find the code?
Glancing at the code, I think it's detectMultiScaleNoGrouping and then the operator() of CascadeClassifierInvoker gets called. It will probably help you to put a breakpoint and step through that bit of the code.
On GitHub https://github.com/opencv/opencv
What are some alternatives?
libvips - A fast image processing library with low memory needs.
VTK - Mirror of Visualization Toolkit repository
yolov5 - YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
CImg - The CImg Library is a small and open-source C++ toolkit for image processing
EasyOCR - Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
Boost.GIL - Boost.GIL - Generic Image Library | Requires C++14 since Boost 1.80
SimpleCV - The Open Source Framework for Machine Vision
scikit-image - Image processing in Python
Kornia - Geometric Computer Vision Library for Spatial AI
imagick - Go binding to ImageMagick's MagickWand C API
ITK - Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
tesseract-ocr - Tesseract Open Source OCR Engine (main repository)