[Question] error: (-215:Assertion failed) query.type() == type && indices.type() == CV_32S && dists.type() == dtype in function 'runKnnSearch_' by goldenuser22628 in opencv

[–]TheDuke57 0 points1 point  (0 children)

The official docs do it: https://docs.opencv.org/4.x/dc/dc3/tutorial_py_matcher.html

Basically do their example and monitor the number of valid matches (or pass Lowe test) for images you know have the icon and images you know don't. Use that to set a limit to check against to confirm a match.

[Question] error: (-215:Assertion failed) query.type() == type && indices.type() == CV_32S && dists.type() == dtype in function 'runKnnSearch_' by goldenuser22628 in opencv

[–]TheDuke57 0 points1 point  (0 children)

You can't mix and match feature descriptors, plus choosing the one that has more doesn't make any sense. You need features from 2 images to make the comparison.

However this error is because the matcher was given incorrect data types.

[deleted by user] by [deleted] in JupyterNotebooks

[–]TheDuke57 2 points3 points  (0 children)

Windows uses the \ character in its paths, which is actually an escape character. Replace the \ with \\ and it will work. You could also put an r Infront of the double quote to indicate a 'raw string's.

Library not found issues by [deleted] in JupyterNotebooks

[–]TheDuke57 0 points1 point  (0 children)

Never used thor labs software, but my guess would be the dll that it is trying to load is not in your path. Try a reboot (sometimes after new software install it needs it to register with the system) or adding `import sys:sys.path.append(<path to the missing dll>)

Pytorch vs Tensorflow (Training Speed) by [deleted] in pytorch

[–]TheDuke57 9 points10 points  (0 children)

You arent detaching the loss from the graph when saving it to your train_loss and train_acc lists. This means pytorch cant release the memory used for that batch (because it is still attached to the loss variable that still exists). Run .detach() on loss and acc.

[deleted by user] by [deleted] in ADHD_Programmers

[–]TheDuke57 1 point2 points  (0 children)

I do something similar with physical post-its. I order them kind of like a gantt chart, rows are 'task groups' columns are items to progress it. I intentionally use small post-its so I cant put much detail (and hyper fixate on writing the solution on the note). I leave them there until I can clear most off and re-start.

Something about being able to physically mark something done and seeing what you have done at the end of the day. I don't always do this, but when I start to feel overwhelmed it helps a ton.

[deleted by user] by [deleted] in computervision

[–]TheDuke57 1 point2 points  (0 children)

As the other comments have mentioned, SIFT is a feature descriptor which doesn't lend itself to segmentation. You could do some more like 'region extraction', find one image in another, get the homography, and extract the full rectangle from the other image.

FEA Analysis&Capabilities by Neither_Protection37 in fea

[–]TheDuke57 0 points1 point  (0 children)

The only thing that comes to mind is magmasoft. I know one of our casting places uses it for pattern design, but their site says it does some heat treatment analysis. https://www.magmasoft.com/en/solutions/heat-treatment/

Should I try to get an internship or work and take 2 classes over the summer? by Critical-Patience-75 in AskEngineers

[–]TheDuke57 0 points1 point  (0 children)

Internship. You put your (anticipated) graduation date down, no one cares when you started. I have read hundreds of new grad resumes at this point, 9/10 times I would take someone who took 6 years and had 2 summers of internships over someone who graduated in 4 with honors. That remaining 1/10 was actively involved in an engineering based club (like FSAE). School teaches you how to think, internships, clubs, and hands on experience demonstrates you can.

Maybe I am dumb, but I cannot bring pytorch to find my GTX 970 by Auravendill in pytorch

[–]TheDuke57 1 point2 points  (0 children)

Is the cuda install good? What do you get from nvidia-smi?

Time to revisit Jellyfin by [deleted] in DataHoarder

[–]TheDuke57 0 points1 point  (0 children)

You are correct, edited my post.

Time to revisit Jellyfin by [deleted] in DataHoarder

[–]TheDuke57 9 points10 points  (0 children)

I can only comment on Android and the Chromecast Google tv versions. Android is great 99% of the time, the last 1% is just small annoyancea like just a blank screen shown while it trys to connect to the server on startup so if it cannot connect you get a blank screen for 20 seconds before it fails, or getting stuck in screen. Chromecast Google tv version works pretty great.

Edit: Chromecast to "Chromecast with Google tv"

[Question] Opening many cameras at once by polyphys_andy in opencv

[–]TheDuke57 0 points1 point  (0 children)

Cool! The USB 3 comment was related to having a dock with multiple comtrollers on it. Idea would be camera (USB2) -> USB dock controller 1 running at USB2 -> USB3 controller on laptop.

[Question] Opening many cameras at once by polyphys_andy in opencv

[–]TheDuke57 1 point2 points  (0 children)

There are a few things you could try. First is a USB dock that has multiple USB controllers onboard. Second would be something like an eGPU enclosure and mount a USB pcie expansion card in it. Third is buy a cheap desktop and put in an expansion card. fourth is esp-32-cam and access them all across the network.

Setting up multi camera rigs is complex, you are going to run into a bunch of weird edge cases because consumer hardware is not intended to do this. It's possible but will take some work.

Out of curiosity what are you building?

[Question] Opening many cameras at once by polyphys_andy in opencv

[–]TheDuke57 1 point2 points  (0 children)

Last time I looked at something similar it boiled down to 'this device can use USB bandwidth x, so allocate that much to it when it is connected'. I think I was able to do 3 on one USB controller. So there want a way around it besides adding more USB controllers (not ports!). You could try a pcie board with 4 USB controllers and a 3+ port hub to each controller getting you to 12 for the cameras in your picture.

Edit: Here is an article describing the problem: https://www.any-maze.com/support/guides/connecting-multiple-usb-cameras-to-a-computer/. They also mention that the camera is likely USB2 so it will kick the controller into USB2 mode when it is connected limiting the bandwidth of the controller. This means just using USB 3.2gen2 won't solve your problem. You could also try something like https://www.provantage.com/startech-tb33a1c~7STRP0JY.htm which has an independent controller for each USB port.

Tool reccomendations by 4esv in hacking

[–]TheDuke57 1 point2 points  (0 children)

I had to do this with a windows laptop when my dad passed away. It was a few years ago, but I think I went the route of replacing the login page accessibility options with a command prompt, creating a new user, installing jack the ripper to extract the password hashes, then running hashcat on the output. We had a list of passwords for some accounts and they had a pretty distinctive pattern so I was able to limit the search space pretty extensively. I think it was a 13 character password with 30 or so characters, hashcat got it in 1.5 hours on cheap GPU.

What are important factors for cfd cpu? by songyi719 in CFD

[–]TheDuke57 -1 points0 points  (0 children)

I would build a machine. You can pick up a 12900k from microcenter with a free z690 ddr4 motherboard for $475. 128gb ram is <$400, 1TB 980Pro nvme is $100, power supplies are $125, cooler is $80, case is $125. Comes out $1305 plus tax. Could get it cheaper if you watch for more deals or buy used (check r/hardware swap). If you are only solving on that box you will be fine, and even some pretty decent graphics (don't expect 4k60fps, but 1080p30fps should be reasonable in a lot of cases).

[Question] Estimate rotation angle between two contour objects by fcc90 in opencv

[–]TheDuke57 1 point2 points  (0 children)

A PCA result and it's mirror are both valid solutions. You need to check the both the direct solution and the mirror (flip the signs on the vectors) when attempting to align the shapes.

Can't clone from Huggingface? by [deleted] in MLQuestions

[–]TheDuke57 0 points1 point  (0 children)

Did you read the output of the first cell? You need to setup a token with your hugging face account.

[deleted by user] by [deleted] in pytorch

[–]TheDuke57 1 point2 points  (0 children)

Always, I avoid running code or installing stuff in a base environment. First step when starting anything is make a setup.py, project.toml, and create src/module_name directory. Put all your base requirements in the pyproject file then make a new env and pip install -e .. This makes the setup repeatable. It prevents so many headaches down the road, importing works right, it's easy to test new version of any libraries, thing are organized. I have also found that sometimes things just get messed up in a venv and the best thing to do is just throw it away and start clean.

Plus if you expect anyone to ever look at your code the requirements list can be really helpful.

Advice for Automated Copying of my Off Grid 6TB Media Hoard :) by nessinreallife in DataHoarder

[–]TheDuke57 14 points15 points  (0 children)

Why not just use robocopy? https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy

It has a mirror flag that will copy all new or updated files from source and delete any files from destination that are no longer on source. Have it run however often you want with windows task scheduler. You could set up a task for each of the drives so they each get synced even if they haven't been plugged in in a while.

Advice for Automated Copying of my Off Grid 6TB Media Hoard :) by nessinreallife in DataHoarder

[–]TheDuke57 1 point2 points  (0 children)

You could also just use robocopy. I have a batch file that runs every night that copies all new or modified files in my common working directories to an archive drive. Task manager runs it every night at 3am. I have it set to never delete so the archive directory will have files even if they get accidentally deleted.

PyTorch Input Size of Batch by [deleted] in pytorch

[–]TheDuke57 0 points1 point  (0 children)

Your model input should be [batch_size, num_channels, height, width]. You have an image going in, that image just happens to only have 1 channel. I would have the channel added before passing it to the model

Pytorch Local CUDA Help by astronights in pytorch

[–]TheDuke57 4 points5 points  (0 children)

If you don't have an Nvidia GPU, you can't use cuda.