# Path: basic/common.py
# ROOT_PATH = "/home/b/VisualSearch1"
# 
# def makedirsforfile(filename):
#     try:
#         os.makedirs(os.path.split(filename)[0])
#     except:
#         pass
# 
# def checkToSkip(filename, overwrite):
#     if os.path.exists(filename):
#         print ("%s exists." % filename),
#         if overwrite:
#             print ("overwrite")
#             return 0
#         else:
#             print ("skip")
#             return 1
#     return 0    
# 
# def printStatus(trace, message):
#     printMessage('INFO', trace, message)


import sys
import os
import numpy as np
from basic.common import ROOT_PATH, makedirsforfile, checkToSkip, printStatus
from bigfile import BigFile
    from optparse import OptionParser

INFO = 'simpleknn.%s' % os.path.basename(__file__)

def process(options, feat_dir, imsetfile, result_dir):

    resultfile = os.path.join(result_dir, 'feature.bin')
    if checkToSkip(resultfile, options.overwrite):

# Path: basic/common.py
# ROOT_PATH = "/home/b/VisualSearch1"
# 
# def makedirsforfile(filename):
#     try:
#         os.makedirs(os.path.split(filename)[0])
#     except:
#         pass
# 
# def checkToSkip(filename, overwrite):
#     if os.path.exists(filename):
#         print ("%s exists." % filename),
#         if overwrite:
#             print ("overwrite")
#             return 0
#         else:
#             print ("skip")
#             return 1
#     return 0    
# 
# def printStatus(trace, message):
#     printMessage('INFO', trace, message)


# Path: simpleknn/im2fea.py
import sys
import os
import numpy as np
from basic.common import ROOT_PATH, makedirsforfile, checkToSkip, printStatus
from bigfile import BigFile
    from optparse import OptionParser


INFO = 'simpleknn.%s' % os.path.basename(__file__)

def process(options, feat_dir, imsetfile, result_dir):

    resultfile = os.path.join(result_dir, 'feature.bin')
    if checkToSkip(resultfile, options.overwrite):

        sys.exit(0)