Skip to content

Commit

Permalink
Merge pull request #28 from saaresearch/master
Browse files Browse the repository at this point in the history
Update old version
  • Loading branch information
aimspot authored Nov 24, 2023
2 parents 94b1659 + f0745bf commit 23d06c0
Show file tree
Hide file tree
Showing 20 changed files with 296 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pep8-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
pip install flake8
- name: Run PEP8 test
run: |
flake8 --max-line-length=130 --exclude=ODRS/train_utils/train_model/models/*,ODRS/ml_utils/*,ODRS/train_utils/custom_train_all.py,ODRS/train_utils/train_model/scripts/yolov7_train.py,tests/* .
flake8 --max-line-length=130 --exclude=ODRS/train_utils/train_model/models/*,ODRS/ml_utils/*,ODRS/train_utils/custom_train_all.py,ODRS/train_utils/train_model/scripts/yolov7_train.py,tests/*,docs/* .
18 changes: 18 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

python:
install:
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion ODRS/train_utils/config/custom_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BATCH_SIZE: 10
CLASSES: classes.txt
CONFIG_PATH: dataset.yaml
DATA_PATH: /home/runner/work/ODRS/ODRS/user_datasets/yolo/aeral
EPOCHS: 10
EPOCHS: 2
GPU_COUNT: 0
IMG_SIZE: 300
MODEL: yolov5m
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# ODRS
[![PythonVersion](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10-blue)](https://pypi.org/project/scikit-learn/)

[![Documentation Status](https://readthedocs.org/projects/odrs-test/badge/?version=latest)](https://odrs-test.readthedocs.io/en/latest/?badge=latest)

<div align="center">
<p>
<a align="center" href="https://github.com/saaresearch/ODRS" target="_blank">
Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Empty file added docs/__init__.py
Empty file.
Empty file modified docs/img/README.MD
100755 → 100644
Empty file.
Empty file modified docs/img/alg_scheme.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/img/model_list.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR= source
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
4 changes: 4 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sphinx
sphinx_rtd_theme
autodocsumm

12 changes: 12 additions & 0 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "!layout.html" %}
{% block footer %} {{ super() }}

<style>
/* Sidebar header (and topbar for mobile) */
.wy-side-nav-search, .wy-nav-top {
background: #f2f2f2;
}
/* Sidebar */

</style>
{% endblock %}
107 changes: 107 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import datetime
import sys
sys.path.insert(0, os.path.abspath('../..'))
from sphinx.builders.html import StandaloneHTMLBuilder

# -- Project information -----------------------------------------------------

project = 'ODRS'
copyright = '2023, Artem Smetanin, Mikhail Gerasimchuk'
author = 'Artem Smetanin, Mikhail Gerasimchuk'
release = '0.1.0'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_rtd_theme',
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.mathjax',
'autodocsumm',
'sphinx.ext.autosummary',
'sphinx.ext.autodoc.typehints',
'sphinx.ext.graphviz',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
StandaloneHTMLBuilder.supported_image_types = [
'image/svg+xml',
'image/gif',
'image/png',
'image/jpeg'
]
html_theme = "sphinx_rtd_theme"
html_logo = '../img/logo.png'
html_theme_options = {
'logo_only': True,
'display_version': False,
}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']

# -- Extension configuration -------------------------------------------------

# autodoc_inherit_docstrings = False
# napoleon_google_docstring = True
# napoleon_include_init_with_doc = True
napoleon_google_docstring = True
napoleon_numpy_docstring = False
napoleon_include_init_with_doc = False
napoleon_include_private_with_doc = True
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = True
napoleon_use_admonition_for_notes = True
napoleon_use_admonition_for_references = False
napoleon_use_ivar = True
napoleon_use_keyword = True
napoleon_use_param = True
napoleon_use_rtype = True
napoleon_attr_annotations = False

autodoc_default_options = {
'members': True,
'undoc-members': False,
'show-inheritance': True,
'member-order': 'bysource',
'ignore-module-all': True,
}
autoclass_content = 'class'
autodoc_typehints = 'signature'
autodoc_typehints_format = 'short'
autodoc_mock_imports = ['objgraph', 'memory_profiler', 'gprof2dot', 'snakeviz']


12 changes: 12 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Welcome to ODRS documentation!
============================================
Content:
========
.. toctree::
:maxdepth: 1

introduction/index




Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/source/introduction/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Introduction to Framework
=========================

.. image:: ./img_introduction/logo.png

.. toctree::
:maxdepth: 1
:caption: Content:

installation
quickstart
architecture
license

ODRS - it an open source recommendation system for training object detection models. Our system allows you to choose the most profitable existing object recognition models based on user preferences and data. In addition to choosing the architecture of the model, the system will help you start training and configure the environment.
The proposed recommendation system consists of several components that interact to generate recommendations for machine learning pipelines.


12 changes: 12 additions & 0 deletions docs/source/introduction/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _installation:

How to install
================
from GitHub
------------------------

.. code-block:: console
git clone https://github.com/saaresearch/ODRS.git
cd ODRS/
pip install -r requirements.txt
34 changes: 34 additions & 0 deletions docs/source/introduction/license.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
License information
===================

.. code-block:: console
BSD 3-Clause License
Copyright (c) 2022, Natural Systems Simulation Lab
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18 changes: 18 additions & 0 deletions docs/source/introduction/quickstart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Quickstart
==========

.. code-block:: python
from ODRS.ODRS.api.ODRS import ODRS
#init object with parameters
odrs = ODRS(job="object_detection", data_path = 'full_data_path', classes = "classes.txt",
img_size = "512", batch_size = "25", epochs = "300",
model = 'yolov8x6', gpu_count = 1, select_gpu = "0", config_path = "dataset.yaml",
split_train_value = 0.6, split_test_value = 0.35, split_val_value = 0.05)
from ODRS.ODRS.api.ODRS import ODRS
odrs.fit()
8 changes: 1 addition & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ fonttools==4.38.0
gast==0.4.0
gitdb==4.0.10
GitPython==3.1.32
google-auth==2.16.0
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.51.1
h5py==3.8.0
idna==2.8
Expand Down Expand Up @@ -99,9 +96,6 @@ tensorboard==2.11.2
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorboardX==2.6
tensorflow==2.11.1
tensorflow-estimator==2.11.0
tensorflow-io-gcs-filesystem==0.31.0
termcolor==2.2.0
thop==0.1.1.post2209072238
threadpoolctl==3.2.0
Expand All @@ -122,4 +116,4 @@ Werkzeug==2.2.3
wrapt==1.15.0
zipp==3.13.0
yacs
wget
wget

0 comments on commit 23d06c0

Please sign in to comment.