Skip to content

Instantly share code, notes, and snippets.

@lucasw
Last active June 3, 2019 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasw/d619cd6704adee28f91bb24dc90e7e16 to your computer and use it in GitHub Desktop.
Save lucasw/d619cd6704adee28f91bb24dc90e7e16 to your computer and use it in GitHub Desktop.
tensorflow

Tensorflow 2 + Ubuntu 18.04

pip3 install tensorflow-gpu==2.0.0-alpha0

or

pip3 install tensorflow==2.0.0-alpha0

if no nvidia cudo gpu.

jupyter notebook
import tensorflow as tf
print(tf.__version__)

Image annotation

This one is very simple and fast:

https://github.com/Cartucho/OpenLabeling

Would like to have a mode where square is assumed (or some fixed aspect ratio) and the only thing to do is click in the center then scale the square, default would be last scaling.

It would be a good imgui project to make own custom one.

google drive / google photos annotation?

Standalone opengl3 + imgui based annotation https://github.com/lucasw/imgui_test - not a lot of features yet.

@lucasw
Copy link
Author

lucasw commented Jun 2, 2019

Colab

Cheap way to get gpu access (for n-many hours?).

This suggests using github to import data
https://medium.com/@yuraist/how-to-upload-your-own-dataset-into-google-colab-e228727c87e9

Don't want to have write access to all of gdrive, could make a new account just for this (maybe the new account could have read only access to another gdrive, and that would be visible in colab?

from google.colab import files
uploaded = files.upload()

Wbere do the files go? Do they persist or have to be re-uploaded every session?

It would be nice if they were to go into the My Drive/colab Notebooks directory, maybe could drag and drop files directly into there.

It looks like after the kernel goes down everything has to be uploaded again, which is annoying. Maybe shrink the files down again (they were 50%) to speed this up.

@lucasw
Copy link
Author

lucasw commented Jun 2, 2019

image preprocessing

Need a script that will take an image and chop it up into sub images of a given aspect ratio, then resize to desired output resolution/.
Overlap is okay, especially at different resolutions.

May need to manually browse output images and delete those that aren't desired (don't contain the desired content).

Better to do in colab/jupyter, or manually on local disk then upload? Probably the latter.

for i in *jpg; do convert $i -resize 25% ../small/$i; done

@lucasw
Copy link
Author

lucasw commented Jun 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment