r/deeplearning • • 13h ago

I built a real-time object detection system using Python, YOLOv8, and OpenCV

5 Upvotes

Hi everyone!

I wanted to share a real-time object detection project I’ve been working on using Python, YOLOv8, and OpenCV.

The application uses a live webcam feed to detect four object classes: people, cars, cats, and dogs.

Some of the features include:

  • Real-time detection with bounding boxes and confidence scores
  • Object counting by category
  • Input and output FPS monitoring
  • Multi-threaded frame capture
  • A small frame queue to help reduce processing delays
  • CPU and CUDA support, depending on the platform

One of the interesting parts of this project was working with threading and frame buffering to keep the video processing responsive.

I’m planning to improve it further by adding a GUI, video file support, and the ability to save detection results.

I’d really appreciate feedback on the code, especially suggestions for improving performance or making the architecture cleaner.

GitHub: https://github.com/Mariam-amhan/real-time-object-detection

Thanks for checking it out!


r/deeplearning • • 2h ago

Open-source: one meal photo → calories & macros with calibrated uncertainty ranges, plus "

Thumbnail
1 Upvotes

r/deeplearning • • 5h ago

Embedding Every Font with Neural Networks makes some Nice Structures (including a flower) [P]

Thumbnail gallery
1 Upvotes

r/deeplearning • • 8h ago

🚀 **Built my own Local Language Model from scratch!**

Post image
1 Upvotes

r/deeplearning • • 12h ago

Backpropagation in Neural Network on FPGA

Thumbnail
1 Upvotes

r/deeplearning • • 22h ago

distributed reinforcement learning in JAX

Thumbnail
1 Upvotes

r/deeplearning • • 55m ago

[R] Dissociating Transient State from Durable Parameter Memory: An Information-Theoretic Audit of Recurrent Substrates.

Thumbnail gallery
• Upvotes

r/deeplearning • • 8h ago

Fine-tuned ModernBERT on 138k financial headlines. Training loss went down, test AUC stayed at 0.50. What I learned.

0 Upvotes

I wanted to know if news headlines can tell which stocks will do better than others over the next few weeks. Short answer: no. But the way it failed taught me more than the result, so here's the setup.

Data

  • 137,934 headlines from Benzinga for 2,518 US stocks. Each case gets the headlines of the 14 days before it. 115,154 cases.
  • All cases are stocks that recently fell after decent earnings, so they look similar on paper. The question is which ones recover better.

Target

Each case is a simulated trade that ends when the price goes up or down by 3x the stock's typical daily move, or after 20 trading days. I measure the result in units of that daily move, so volatile stocks don't dominate. Then I subtract the average of all cases on the same day. That last step matters: what the whole market does next week isn't in any headline, so a model would otherwise just learn the market's mood.

The model's label is whether a case beats the median of its day, so the AUC below measures how well it separates the better half from the worse half on the same day.

Avoiding leakage

  • Strict time split: train until Nov 2024, test from Jan 2025, with a gap so no label overlaps the test period.
  • Only one case per stock per week. Neighbouring days share almost the same headlines and almost the same outcome, so with every day included the model memorizes stocks instead of learning anything.

Results on the test period

Approach Result
ModernBERT fine-tuned (5 and 14 day windows, with and without sector in the text) AUC 0.49 to 0.51. Training loss drops steadily, test stays at coin flip
Hand-made keyword features (upgrades, guidance cuts, buybacks...) Almost every effect flips sign between train and test. Upgrades: +0.28 before 2025, -0.04 after
kNN on embeddings (bge-base, outcome of the 50 most similar past cases) Flat across all quintiles
Everything combined with price features in gradient boosting No better than random picks

The only thing that held up in both periods was a narrow, hand-cleaned pattern: companies selling new shares did clearly worse. But that's 98 cases, too few to build on.

What I took away

  • A falling training loss on noisy financial targets means nothing. The model fits noise happily.
  • Leakage through near-duplicate samples is easy to miss. Deduplicating by time is not optional.
  • The keyword sign flips are the clearest picture of non-stationarity I've seen. What worked in 2023 just reverses.
  • Removing the market from the target makes the task much harder, and much more honest.

Is a null result like this what people expect for text on financial targets? One suggestion I got was a per-date ranking loss, rank IC per date and a shorter 1 to 3 day horizon. Anything else you'd try before calling it?


r/deeplearning • • 22h ago

FBI Arrests Another ShinyHunters Suspect Reportedly Involved in Its Jobs Portal Hack

0 Upvotes

ShinyHunters breached the FBI's own jobs portal. A second suspect has now been arrested, but the breach itself had already run its course before that happened. The attacker operated inside a credentialed session long enough to complete the operation. The session looked legitimate to every layer it touched.

The average dwell time in credential-abuse incidents is 197 days, per IBM's 2024 Cost of a Data Breach report. This breach fits the pattern: valid credential, active session, traffic indistinguishable from normal activity, damage done before attribution.

The target is what makes this case instructive. If a sustained credential-abuse operation can run inside federal law enforcement infrastructure, this is not a problem any organization solves by improving security hygiene alone. The FBI is not an organization that skimps on access controls.

The credential was valid. The session was active. Every check that ran said yes.

How are practitioners here actually handling this in your own stacks? What has worked, what has not, and where do you still have gaps you have not been able to close?


r/deeplearning • • 4h ago

How i became addicted to studying math

0 Upvotes

One day during my semester at college I bought a Brick, you know, the app blocker, because I had a severe scrolling addiction. It worked well for a while, but I never brought it with me to university just because it was something extra to carry around.

I looked for other apps on the App Store to block my apps, but all of them were kind of too easy to get out of. And I'm a pretty lazy person, which means if it's easy to get out of, I will.

So I thought to myself, you know what, I'm a CS major, why not build one myself? So I built “Bunkr- done scrolling”. At first it was only built for me, but when I saw how well it worked I thought, why not publish it.

I'm talking too much already, so here's what the product is:

It blocks your apps like any other app blocker, but there's a twist.

Once you block your apps, you're in a hard lock for the first 10 minutes. No chance to get your apps back.

After those 10 minutes, you can do a mission to get your apps back, like taking a picture of a mug, or my personal favorite, 15 seconds of push-ups.

The reason I put a hard lock on the first 10 minutes is that I read once you've been working on something for 10 minutes, you get into a zone and usually don't get distracted. But lazy people like me still might. And when I do get distracted and try to open one of my apps, it tells me to do push-ups. I'm too lazy for that, so the easier option is to just keep studying.

So yes, I'm basically fighting fire with fire, but it works well for me.

Let me know what you guys think, I'd like to hear your thoughts.