In the middle of the desert you can say anything you want
If there are too many people with video on, Google Hangouts moves the ones who talk closer to the beginning, making them visible?
Got bitten yet again when copypasting them - the name of one of them had four leading tabs. THAT DIDN"T GET SHOWN UNTIL I TRIED TO EDIT THE ENVIRONMENT VARIABLE IN THE PYCHARM WINDOW - it removes them when visualizing. Why? (The parameter of the last one had a trailing space too)
-0.0
exists as float, and gets stored like this. Though it’s not less than 0 or +0.0. Can’t easily google a way to detect if it’s a negative 0 or not.
Aesthetically very pleasant category: Category:SVG signatures of musicians - Wikimedia Commons
GitHub - Nukesor/pueue: Manage your shell commands. (thank you AA)
GitHub - kettanaito/naming-cheatsheet: Comprehensive language-agnostic guidelines on variables naming. Home of the A/HC/LC pattern. (thank you AA)
From it:
Name | Prefix | Action (A) | High context (HC) | Low context (LC) |
---|---|---|---|---|
getUser |
get |
User |
||
getUserMessages |
get |
User |
Messages |
|
handleClickOutside |
handle |
Click |
Outside |
|
shouldDisplayMessage |
should |
Display |
Message |
When training on different GPUs on the same server, I get errors like RuntimeError: DataLoader worker (pid 30141) exited unexpectedly with exit code 1.
The fix was to set the number of workers to 0: 1
cfg.DATALOADER.NUM_WORKERS = 2
From SO: 1
[..]the only difference between mAP for object detection and instance segmentation is that when calculating overlaps between predictions and ground truths, one uses the pixel-wise IOU rather than bounding box IOU.
Finding an optimal cutoff point in a ROC curve is largely arbitrary (or ‘depending on what you need’ based on the actual thing). A lot of ways to find this. (Nice list here, but I’d see if I can find a paper with a good overview: data visualization - How to determine best cutoff point and its confidence interval using ROC curve in R? - Cross Validated)
Nice series of posts on how Detectron2 works inside: Digging into Detectron 2 — part 1 | by Hiroto Honda | Medium
The best way to build intuition about how your model performs is by looking at predictions that it was confident about but got wrong. With FiftyOne, this is easy. For example, let’s create a view into our dataset looking at the samples with the most false positives
More examples of the same: IoU a better detection evaluation metric | by Eric Hofesmann | Towards Data Science
In my text notes, I use indentation heavily, but use bullet-point-dashes (-) and just indentation almost interchangeably:
One two
Three
Four
Five
- six
- seven
- eight
Nine
Ten
- 12
- Thirteen
Next part
From now on:
tensor.cpu().numpy()
needs to be done when using GPU.
Паста с морепродуктами в сливочном соусе рецепт – итальянская кухня: паста и пицца. «Еда»
NVIDIA Nsight Systems | NVIDIA Developer
Found here (a nice article too): Object Detection from 9 FPS to 650 FPS in 6 Steps | paulbridger.com
Multiprocessing best practices — PyTorch 1.8.0 documentation
TL;DR:
torch.multiprocessing
is a drop in replacement for Python’smultiprocessing
module
If Detectron2 complains about wanting a GPU and finding no CUDA (because there’s none), the script can be set to CPU-only through the settings:
cfg.MODEL.DEVICE = 'cpu'
I should read documentation more often: detectron2.structures — detectron2 0.3 documentation
category_3_detections = instances[instances.pred_classes == 3]
confident_detections = instances[instances.scores > 0.9]
In general about model outputs: Use Models — detectron2 0.3 documentation
mytensor.numpy()
is unsurprisingly easy.
Shapely geometries can be processed into a state that supports more efficient batches of operations.
(The Shapely User Manual — Shapely 1.7.1 documentation)
if joined_boxes.geom_type == 'MultiPolygon':
is much cleaner than the isinstance(joined_boxes, MultiPolygon) I’ve been using!
Also - TODO - why is a Polygon that created a MultiPolygon within()
it, if `within()..
Returns True if the object’s boundary and interior intersect only with the interior of the other (not its boundary or exterior).
Their boundary should touch, so shouldn’t be valid?
Nice (and one of the only..) graphic explanation: R-tree Spatial Indexing with Python – Geoff Boeing
Shapely has a partial implementation: 1
Pass a list of geometry objects to the STRtree constructor to create a spatial index that you can query with another geometric object. Query-only means that once created, the STRtree is immutable.
TL;DR:
tree = STRtree(all_geoms)
results = tree.query(query_geom)
In general if I’ll be working more with shapes I should hang out in GIS places to to absorb approaches and terminology. One of R-Tree’s use-cases is say “find restaurants inside this block” which can also be solved by blind iteration (but shouldn’t).
Finally got the more familiar keybinding to work, as usual config.py
:
config.bind('<Ctrl-Shift-C>', 'yank selection')`
config.bind(',y', 'yank selection')
johnnydep2 is really cool and visualizes the dependencies of something without installing them (but still downloads them!)
Found .local/share/Trash
with 33Gb of ..trash in it.
A .whl
file is just an archive, can be unzipped. The entire list of dependencies is in yourpackage.dist-info/METADATA
, looks like this:
Requires-Python: >=3.6
Provides-Extra: all
Provides-Extra: dev
Requires-Dist: termcolor (>=1.1)
Requires-Dist: Pillow (>=7.1)
..exists, and in general I should pay more attention to the new python versions and their changes.
Ubuntu Manpage: tiffsplit - split a multi-image TIFF into single-image TIFF files
Installs as libtiff-tools
, basename can be used as prefix.