Skip to content

Commit

Permalink
Merge pull request #68 from jasmcaus/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jasmcaus committed Oct 1, 2021
2 parents 17219d4 + 95670d7 commit 03755db
Show file tree
Hide file tree
Showing 124 changed files with 100 additions and 16,568 deletions.
14 changes: 0 additions & 14 deletions .github/toc.yml.off

This file was deleted.

14 changes: 0 additions & 14 deletions .github/welcome.yml.off

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
# - name: Install Reqs
# run: |
# python -m pip install --upgrade pip
# python -m pip install -r requirements/default.txt
# python -m pip install -r requirements/build-docs.txt
# python -m pip install -r tools/requirements/default.txt
# python -m pip install -r tools/requirements/build-docs.txt
# python -m pip install .

# - name: Building Docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
shell: bash -l {0}
run: |
conda install curl make -c conda-forge
pip install -r requirements/test.txt
pip install -r tools/requirements/test.txt
make install
- name: Run Tests
Expand Down
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ disable=R,
no-name-in-module,
invalid-unary-operand-type,
redefined-outer-name,
pointless-string-statement
pointless-string-statement,
unspecified-encoding

# disable=R,
# C,
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ formats:
python:
version: 3.7
install:
- requirements: requirements/default.txt
- requirements: requirements/build-docs.txt
- requirements: tools/requirements/default.txt
- requirements: tools/requirements/build-docs.txt
8 changes: 0 additions & 8 deletions AUTHORS

This file was deleted.

16 changes: 0 additions & 16 deletions caer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
Colorspace manipulation
data
Standard high-quality test images
filters
Advanced Image Filters
path
OS-specific Path Manipulations
preprocessing
Expand Down Expand Up @@ -93,22 +91,11 @@ def copyright():
from .preprocess import (
preprocess_from_dir,
sep_train,
shuffle,
reshape,
normalize,
__all__ as __all_preprocess__
)

# General utilities
from .core import (
median,
mean,
merge,
split,
npmean,
to_array,
array,
asarray,
train_val_split,
get_classes_from_dir,
sort_dict,
Expand Down Expand Up @@ -219,7 +206,6 @@ def get_caer_methods():

from .transforms import __all__ as __all_transforms__
from .data import __all__ as __all_data__
# from .filters import __all__ as __all_filters__
from .path import __all__ as __all_path__
from .preprocessing import __all__ as __all_preprocessing__
from .video import __all__ as __all_video__
Expand All @@ -230,7 +216,6 @@ def get_caer_methods():
__all__ += __all_transforms__
__all__ += __all_color__
__all__ += __all_data__
# __all__ += __all_filters__
__all__ += __all_io__
__all__ += __all_path__
__all__ += __all_preprocessing__
Expand All @@ -253,6 +238,5 @@ def get_caer_methods():
del __all_transforms__
del __all_color__
del __all_data__
# del __all_filters__
del __all_preprocessing__
del __all_video__
2 changes: 1 addition & 1 deletion caer/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


# We don't want to modify the root dir in any way
# This gets distrupted if this file is called directly
# This gets disrupted if this file is called directly
# Checks are in place:

if __name__ != '__main__':
Expand Down
8 changes: 4 additions & 4 deletions caer/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# Copyright 2020-2021, Caer
author = 'Jason Dsouza'
author_email = 'jasmcaus@gmail.com'
version = '1.9.8'
full_version = '1.9.8'
git_version = 'f5b45305206dab24317928633e6a98074cd79a7b'
version = '1.9.9'
full_version = '1.9.9'
git_version = 'aaf0eafd5df0de00930921a1586ef2dc102ab6fc'
release = True
contributors = ['Jason Dsouza <jasmcaus@gmail.com>', '', 'Malik M Alnakhaleh <@MalikMAlna>']
contributors = ['Jason Dsouza <@jasmcaus>', '', 'Special Thanks to:', '@MalikMAlna', '@lucasace', '@GitHubDragonFly']
homepage = 'https://github.com/jasmcaus/caer'
11 changes: 0 additions & 11 deletions caer/adorad/types.py

This file was deleted.

54 changes: 4 additions & 50 deletions caer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
def median(arr, axis=None):
return np.median(arr, axis=axis)


def mean(image, mask=None):
try:
return cv.mean(image, mask=mask)
Expand All @@ -52,30 +52,6 @@ def merge(tens):

return cv.merge(tens)


def split(tens):
try:
return cv.split(tens)
except:
raise ValueError('mean() expects an image')


def npmean(arr):
return np.mean(arr)


def array(obj, dtype=None, order='K'):
return np.array(obj, dtype=dtype, order=order)


def to_array(obj, dtype=None, order='K'):
return np.array(obj, dtype=dtype, order=order)


def asarray(obj, dtype=None, order=None):
return np.asarray(obj, dtype=dtype, order=order)


def get_classes_from_dir(DIR, verbose=0):
if len(listdir(DIR, verbose=0)) == 0:
raise ValueError('The specified directory does not seem to have any folders in it')
Expand Down Expand Up @@ -104,9 +80,6 @@ def train_val_split(X, y, val_ratio=.2):
data = []
for i in range(len(X)):
data.append([X[i], y[i]])

# import random
# random.shuffle(data)

split = int(len(X) - (len(X) * val_ratio)) - 1

Expand All @@ -116,6 +89,8 @@ def train_val_split(X, y, val_ratio=.2):
X_train, y_train = _sep(data_train)
X_val, y_val = _sep(data_test)

del data

return X_train, X_val, y_train, y_val


Expand Down Expand Up @@ -161,25 +136,4 @@ def edges(tens, threshold1=None, threshold2=None, use_median=True, sigma=None):
else:
canny_edges = cv.Canny(tens, threshold1, threshold2)

return canny_edges


# def energy_map(tens):
# tens = bgr_to_gray(tens.astype(np.uint8))

# dx = cv.Sobel(tens, cv.CV_16S, 1, 0, ksize=3)
# abs_x = cv.convertScaleAbs(dx)
# dy = cv.Sobel(tens, cv.CV_16S, 0, 1, ksize=3)
# abs_y = cv.convertScaleAbs(dy)
# output = cv.addWeighted(abs_x, 0.5, abs_y, 0.5, 0)

# return output


# def color_map(tens):
# gray_tens = bgr_to_gray(tens)

# heatmap = cv.applyColorMap(gray_tens, 11)
# superimpose = cv.addWeighted(heatmap, 0.7, tens, 0.3, 0)

# return superimpose
return canny_edges
1 change: 0 additions & 1 deletion caer/data/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions caer/distance/__init__.py

This file was deleted.

0 comments on commit 03755db

Please sign in to comment.