Skip to content

Instantly share code, notes, and snippets.

'''
Parses crop file to create forward pass embeddings
'''
import os
import sys
import simplejson as json
import time
import multiprocessing as mp
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
app.js:108 Error: [$rootScope:inprog] http://errors.angularjs.org/1.3.17/$rootScope/inprog?p0=%24apply
at Error (native)
at http://ai-platform.withthebest.com/app.js:12:417
at r (http://ai-platform.withthebest.com/app.js:125:147)
at m.$apply (http://ai-platform.withthebest.com/app.js:132:459)
at addResult (http://ai-platform.withthebest.com/app.js:11346:25600)
at new <anonymous> (http://ai-platform.withthebest.com/app.js:11346:26510)
at Object.e [as invoke] (http://ai-platform.withthebest.com/app.js:42:315)
at y.instance (http://ai-platform.withthebest.com/app.js:82:79)
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
app.js:108 Error: [$rootScope:inprog] http://errors.angularjs.org/1.3.17/$rootScope/inprog?p0=%24apply
at Error (native)
at http://ai-platform.withthebest.com/app.js:12:417
at r (http://ai-platform.withthebest.com/app.js:125:147)
at m.$apply (http://ai-platform.withthebest.com/app.js:132:459)
at addResult (http://ai-platform.withthebest.com/app.js:11346:25600)
at new <anonymous> (http://ai-platform.withthebest.com/app.js:11346:26510)
at Object.e [as invoke] (http://ai-platform.withthebest.com/app.js:42:315)
at y.instance (http://ai-platform.withthebest.com/app.js:82:79)
@atqamar
atqamar / gist:a1940c55a81a769f8364d30c4396bc68
Created September 16, 2016 22:40
Categories that occur at different levels of the heirarchy
Level 1
Jazz [2] | Body, Mind & Spirit [2] | Body, Mind & Spirit [3] | Boutique [3] | Poetry [2] | Poetry [3] | Religion [2] | Pets [2] | Christian & Gospel [2] | Psychology [2] | Automotive, Boat And Motorcycle [2] | Photography [2] | Photography [3] | Philosophy [2] | Philosophy [3] | Software [3] | Software [4] | Karaoke [2] | Karaoke [3] | Juvenile Fiction [2] | Action Figures & Collectibles [2] | Juvenile Nonfiction [2] | Musical Instruments [3] | Crafts [2] | Art [2] | Art [3] | Study Aids [2] | Reference [2] | Reference [3] | Literary Criticism [2] | Education [2] | Education [3] | Literary Collections [2] | Business & Industrial [2] | Crafts & Hobbies [2] | Crafts & Hobbies [3] | Antiques [2] | Sports [2] | Sports [3] | Easy Listening [2] | Office Supplies [3] | Latin [2] | Latin [3] | True Crime [2] | Antiques & Collectibles [2] | Antiques & Collectibles [3] | Pet Toys [2] | Food & Gourmet [2] | Foreign Language Study [2] | Baby [3] | Medical [2] | Medical [3] | Reggae [2] | Pet Supplies [3] | Health
@atqamar
atqamar / gist:0eb8a948753a5ceab99b3f432c501efa
Last active September 28, 2016 03:05
Categories with "Clothing" or "Apparel"
<# of products> <Category leaf>
25 Boutique~~Clothing
37 Boutique~~Clothing Accessories
33 Boutique~~Clothing Accessories~~Belt
19 Boutique~~Clothing Accessories~~Eyewear
3 Boutique~~Clothing Accessories~~Gloves
53 Boutique~~Clothing Accessories~~Keychain
5 Boutique~~Clothing Accessories~~Lanyard
6 Boutique~~Clothing Accessories~~Leg Warmers
18 Boutique~~Clothing Accessories~~Scarf
@atqamar
atqamar / gist:7b465c353abeeae0f103d2d357857d28
Created October 8, 2016 02:13
TG Object Detector Categories
backpack
bag other
bikini
bra
dress
earring
eyewear
footwear regular
footwear tall
gloves
@atqamar
atqamar / gist:e4d9ea8aa5047b6f05e4f0a0560bbb44
Created October 8, 2016 02:33
TG Metadata Extraction Labels
COLOR
brown leather
color acid green
color anthracite
color azure
color beige
color black
color black leather
color blackgold
color blackwhite
@atqamar
atqamar / fashionnet.py
Last active April 27, 2018 03:43
Rough draft of fashionnet using slim
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
# from nets import inception_utils
from slim.nets.tg_layers import pad_conv2d, pad_max_pool2d, pad_avg_pool2d
@atqamar
atqamar / tg_layers.py
Created August 2, 2017 00:53
TG wrappers to enable padding for slim's layers
import tensorflow as tf
slim = tf.contrib.slim
VALID_PADDINGS = set(['SAME', 'VALID'])
# NOTES: even though pad_* functions aren't decorated by add_arg_scope, the
# convolutions within are within the arg_scope
#
# layer arguments are copied from:
@atqamar
atqamar / labels2categories.py
Last active September 7, 2017 22:13
TG labels to categories mapping
# here we list all relevant nums (label ids)
nums = [
1, 3, 4, 13, 19, 20, 26, 27, 34, 35, 52, 63, 72, 73, 74, 75, 77, 79, 80, 82,
83, 85, 89, 91, 93, 104, 106, 107, 109, 167, 168, 172, 190, 195, 196, 198, 203,
204, 205, 206, 208, 209, 215, 218, 219, 235, 246, 266, 271, 273, 288, 289, 290,
292, 293, 295, 296, 297, 299, 300, 301, 302, 303, 304, 306, 307, 308, 309, 310,
311, 312, 313, 319, 320, 326, 328, 329, 331, 332, 335, 336, 337, 338, 340, 341,
343, 344, 347, 348, 349, 350, 351, 352, 354, 355, 357, 358, 360, 361, 362, 363,
364, 366, 367, 369, 370, 371, 372, 373, 374, 375, 378, 379, 380, 382, 383, 385,
386, 388, 391, 393, 397, 398, 399, 420, 422, 427, 429, 434, 443, 444, 524, 530,