Category: Blog

  • webpi

    WebPi

    Run a Docker setup of Caddy + MariaDB + Adminer on your Raspberry Pi with one simple command!

    How To

    1. Set up your Raspberry Pi with HypriotOS.
    2. Install git on your Pi via sudo apt-get install git and clone this repo.
    3. Set your preferrences (see below).
    4. Build your docker image for caddy
    5. cd into docker/ and run docker-compose -f webpi.yaml up -d

    If everything works you should see “Hello World” via http://192.168.0.XX (the IP for your Pi). Manage your database via Adminer on 192.168.0.XX:2015.

    Default Ports

    Service Port
    Caddy 80
    MariaDB 3306
    Adminer 2015

    Preferences

    Make sure to change the following settings:

    Service Folder Contents
    docker-compose file docker/webpi.yaml Set the name for your caddy image under web: … image:
    docker-compose file docker/webpi.yaml Change your MY_SQL settings under environment
    index.php caddy/www/index.php Set values for accessing MariaDB via PHP

    Caddy

    The Caddyfile will be taken from docker/caddy/ and mounted into /etc/Caddyfile inside the container. www/ will be mounted into /srv/www/

    MariaDB

    A fresh instance of MariaDB will be mounted into /var/lib/mysql/ inside the container. If you have any existing databases, just move them into mariadb/db before you run docker-compose !

    Visit original content creator repository
    https://github.com/obitech/webpi

  • ds_nms


    Описание проекта

    ds_nms библиотека для аналитики данных и машинного обучения, включающая модули для предобработки данных, отбора признаков, обучения моделей, тюнинга гиперпараметров и проведения статистического анализа. Она позволяет автоматизировать ключевые этапы работы с данными и моделями машинного обучения, обеспечивая эффективные инструменты для анализа и оптимизации.


    Содержание


    📦 Репозиторий (ds_nms)
    ├── 📂 ds_nms/                   [Основной пакет библиотеки]
    │   ├── 📄 data_proc.py          [Обработка и предобработка данных]
    │   ├── 📄 feature_select.py     [Отбор значимых признаков]
    │   ├── 📄 model_train.py        [Обучение моделей]
    │   ├── 📄 model_tune.py         [Оптимизация гиперпараметров]
    │   ├── 📄 model_tune_params.py  [Параметры моделей]
    │   ├── 📄 stat_tests.py         [Статистические тесты]
    │   ├── 📄 utils_io.py           [Вспомогательные утилиты]
    │   └── 📄 __init__.py           [Файл инициализации пакета]
    │
    ├── 📂 install/                  [Скрипт установки пакета]
    │   └── 📄 install_ds_nms.py
    │
    ├── 📂 examples/                 [Примеры использования]
    │   ├── 📄 example1.ipynb        [Jupyter Notebook с примерами работы]
    │   ├── 📄 example2.ipynb
    │   └── ...
    │
    ├── 📄 requirements.txt          [Файл с зависимостями (Ubuntu)]
    ├── 📄 requirements_win.txt      [Файл с зависимостями (Windows)]
    ├── 📄 .env                      [Файл с переменными среды (MLFlow)]
    └── 📄 README.md
    

    Основные требования:

    • Операционная система: Ubuntu 22.04 / Windows
    • Python: 3.10.12 / Python: 3.12.3

    Вариант 1. Установка при помощи скрипта

    Установка осуществляется через скрипт install_ds_nms.py, который автоматически создает виртуальное окружение и устанавливает пакет из GitHub.

    Шаги установки:

    1. Из директории репозитория install/ скачать в рабочую директорию файл install_ds_nms.py
    2. Выполните команду:
    python3 install_ds_nms.py
    • Создается виртуальное окружение .venv
    • Установится пакет ds_nms из GitHub-репозитория

    Вариант 2. Ручная установка

    1. Создать виртуальное окружение
    python3 -m venv .venv
    1. Активировать окружение
    source .venv/bin/activate
    1. Установить пакет
    pip install git+https://github.com/NazarovMichail/ds_nms.git@master

    Файл .env

    Файл .env – файл с переменными среды для подключения к базе данных MLFlow.

    Содержание файла:

    • USER_ML = <Имя пользователя Posgresql>
    • PASS_ML = <Пароль Posgresql>
    • HOST_ML = <Хост Posgresql>
    • PORT_ML = <Порт Posgresql>
    • BD_ML = <Название БД Posgresql>

    Модуль data_proc

    Предназначен для обработки и предобработки данных перед анализом и обучением моделей машинного обучения.

    • get_duplicated_df: Поиск и обработка дубликатов
    • features_separate: Разделяет признаки на категориальные и числовые на основе порога уникальных значений
    • get_stratified_df: Добавляет в датафрейм стратификационные группы по квартилям указанного признака
    • df_scaling: Масштабирует числовые данные с использованием StandardScaler, MinMaxScaler, Normalizer, RobustScaler
    • drop_outliers_iso: Удаляет выбросы из данных с использованием метода IsolationForest
    • drop_outliers_tuk: Удаляет выбросы по методу Тьюки (IQR)
    • get_pca: Преобразует группы признаков с использованием PCA и добавляет результат в датафрейм
    • get_VIF: Вычисляет коэффициент инфляции дисперсии (VIF) для анализа мультиколлинеарности
    • plot_corrmatrix: Строит корреляционную матрицу и вычисляет ее ранг и детерминант
    • get_polyfeatures: Генерирует полиномиальные признаки
    • df_target_encoding: Выполняет целевое кодирование категориальных признаков с использованием TargetEncoder

    Модуль feature_select

    Предназначен для отбора значимых признаков в наборах данных

    • get_selected_features: Выполняет отбор признаков с использованием RFE или SFS, возвращая новый набор данных с выбранными переменными.
    • get_best_n_features: Оптимизирует количество признаков с помощью Optuna, проводя кросс-валидацию и выбирая наилучший набор переменных.
    • save_selected_features: Выполняет отбор признаков для нескольких датасетов и моделей, сохраняя результаты

    Модуль model_train

    Предназначен для обучения моделей машинного обучения, оценки их качества и анализа важности признаков.

    • get_feature_importance_df: Возвращает таблицу важности признаков для обученной модели
    • get_importances_barplot: Строит график важности признаков, используя коэффициенты модели и SHAP-значения.
    • get_feat_importance_arima: Анализирует важность признаков в модели SARIMAX
    • get_feature_contrib: Анализирует вклад признаков в предсказания линейных моделей
    • plot_ts_pred: Строит график предсказанных и фактических значений для временных рядов.
    • get_prediction: Возвращает датафрейм с метриками качества модели и массив предсказаний.
    • train_cv: Обучает модель с использованием различных схем кросс-валидации (KFold, LeaveOneOut, StratifiedKFold, TimeSeriesSplit)
    • arima_train: Автоматический подбор параметров и обучение SARIMAX модели для временных рядов.
    • arima_predict: Выполняет предсказание временного ряда с использованием обученной модели SARIMAX.

    Модуль model_tune

    Предназначен для оптимизации гиперпараметров моделей машинного обучения с использованием Optuna.

    • get_optimize_params: Выполняет подбор оптимальных гиперпараметров модели с использованием Optuna.
    • get_optimize_results: Запускает полный процесс оптимизации и последующего обучения модели с лучшими параметрами. Возвращает обученную модель, метрики и предсказания.
    • get_optimize_several_results: Оптимизирует несколько моделей на различных датасетах, сохраняя результаты.
    • get_best_study_params: Определяет лучшие гиперпараметры, отфильтровывая результаты по заданным критериям
    • optuna_plot: Визуализирует Pareto-графики, важность параметров и зависимость метрик от гиперпараметров.
    • mlflow_save_results: Логирует метрики и обученные модели в MLflow
    • get_prediction_df: Создает итоговый датафрейм с предсказаниями и ошибками модели

    Модуль model_tune_params

    Предназначен для управления гиперпараметрами моделей, используемых в процессе обучения и оптимизации. Служит справочником параметров, которые можно изменять и передавать в model_tune для автоматической оптимизации.

    • Класс ModelsParams: Хранит параметры моделей для оптимизации, включая диапазоны значений и базовые параметры. Поддерживаемые модели:

      • K-Nearest Neighbors (KNN)
      • Lasso, Ridge, ElasticNet
      • Huber Regressor
      • Stochastic Gradient Descent (SGD)
      • Support Vector Regressor (SVR)
      • Decision Trees (DT)
      • Random Forest (RF)
      • Extra Trees (EXTR)
      • XGBoost (XGB)
      • LightGBM (LGBM)
      • Stacking Regressor
      • Bayesian Ridge
      • Tweedie Regressor
      • Theil-Sen Regressor
      • ARD Regression
      • Passive Aggressive Regressor (PAR)
    • set_param: Позволяет изменять параметры модели перед их передачей в model_tune

    Модуль stat_tests

    Предназначен для проведения статистических тестов и анализа данных.

    • plot_test_hists: Строит гистограммы для двух выборок, позволяя визуально сравнить их распределения.
    • kolmog_smirn_test: Тест Колмогорова-Смирнова – проверяет, принадлежат ли две выборки одному распределению.
    • kraskel_wallis_test: Тест Краскела-Уоллиса – анализирует статистически значимые различия между независимыми выборками.
    • adfuller_test: Тест Дики-Фуллера (ADF) – проверяет временной ряд на стационарность.
    • kpss_test: KPSS-тест – альтернатива ADF для проверки стационарности временного ряда.
    • stationarity_test: Объединяет результаты ADF и KPSS, предоставляя комплексную оценку стационарности.
    • acf_pacf_plot: Строит автокорреляционную функцию (ACF) и частичную автокорреляционную функцию (PACF).

    Модуль utils_io

    Предназначен для работы с файлами и данными, включая сохранение и загрузку файлов в различных форматах (pickle, json), управление сервером MLflow, а также очистку логов в PostgreSQL.

    • save_data: Сохраняет данные (словарь с объектами) в указанную директорию в форматах pkl или json.
    • load_data: Загружает данные из указанной директории в форматах pkl или json.
    • mlflow_server_start: Запускает сервер MLflow для логирования экспериментов
    • mlflow_run_delete: Удаляет логи MLflow из базы данных PostgreSQL

    • data_proc_test.ipynb: Тестирование функций предобработки данных, включая обнаружение выбросов, масштабирование, кодирование категориальных признаков и анализ корреляции.

      • data_proc
      • stat_tests
      • utils_io
    • data_ts_test.ipynb: Анализ и обработка временных рядов, включая разложение сезонности, обучение моделей и оценку качества прогнозирования

      • model_train
    • feature_contribution.ipynb: Анализ вклада признаков в предсказания моделей с использованием методов интерпретируемости, таких как коэффициенты линейных моделей и SHAP-значения.

      • model_train
    • feature_select_test.ipynb: Проверка методов отбора признаков

      • feature_select
      • utils_io
    • model_tune_test.ipynb: Оптимизация гиперпараметров моделей с использованием Optuna, оценка качества моделей и сохранение лучших конфигураций.

      • model_tune
      • model_tune_params
      • model_train
      • utils_io
    • training_test.ipynb: Проверка функций обучения моделей, расчета метрик и визуализации предсказаний.

      • model_train
      • utils_io
    Visit original content creator repository https://github.com/NazarovMichail/ds_nms
  • ds_nms


    Описание проекта

    ds_nms библиотека для аналитики данных и машинного обучения, включающая модули для предобработки данных, отбора признаков, обучения моделей, тюнинга гиперпараметров и проведения статистического анализа. Она позволяет автоматизировать ключевые этапы работы с данными и моделями машинного обучения, обеспечивая эффективные инструменты для анализа и оптимизации.


    Содержание


    📦 Репозиторий (ds_nms)
    ├── 📂 ds_nms/                   [Основной пакет библиотеки]
    │   ├── 📄 data_proc.py          [Обработка и предобработка данных]
    │   ├── 📄 feature_select.py     [Отбор значимых признаков]
    │   ├── 📄 model_train.py        [Обучение моделей]
    │   ├── 📄 model_tune.py         [Оптимизация гиперпараметров]
    │   ├── 📄 model_tune_params.py  [Параметры моделей]
    │   ├── 📄 stat_tests.py         [Статистические тесты]
    │   ├── 📄 utils_io.py           [Вспомогательные утилиты]
    │   └── 📄 __init__.py           [Файл инициализации пакета]
    │
    ├── 📂 install/                  [Скрипт установки пакета]
    │   └── 📄 install_ds_nms.py
    │
    ├── 📂 examples/                 [Примеры использования]
    │   ├── 📄 example1.ipynb        [Jupyter Notebook с примерами работы]
    │   ├── 📄 example2.ipynb
    │   └── ...
    │
    ├── 📄 requirements.txt          [Файл с зависимостями (Ubuntu)]
    ├── 📄 requirements_win.txt      [Файл с зависимостями (Windows)]
    ├── 📄 .env                      [Файл с переменными среды (MLFlow)]
    └── 📄 README.md
    

    Основные требования:

    • Операционная система: Ubuntu 22.04 / Windows
    • Python: 3.10.12 / Python: 3.12.3

    Вариант 1. Установка при помощи скрипта

    Установка осуществляется через скрипт install_ds_nms.py, который автоматически создает виртуальное окружение и устанавливает пакет из GitHub.

    Шаги установки:

    1. Из директории репозитория install/ скачать в рабочую директорию файл install_ds_nms.py
    2. Выполните команду:
    python3 install_ds_nms.py
    • Создается виртуальное окружение .venv
    • Установится пакет ds_nms из GitHub-репозитория

    Вариант 2. Ручная установка

    1. Создать виртуальное окружение
    python3 -m venv .venv
    1. Активировать окружение
    source .venv/bin/activate
    1. Установить пакет
    pip install git+https://github.com/NazarovMichail/ds_nms.git@master

    Файл .env

    Файл .env – файл с переменными среды для подключения к базе данных MLFlow.

    Содержание файла:

    • USER_ML = <Имя пользователя Posgresql>
    • PASS_ML = <Пароль Posgresql>
    • HOST_ML = <Хост Posgresql>
    • PORT_ML = <Порт Posgresql>
    • BD_ML = <Название БД Posgresql>

    Модуль data_proc

    Предназначен для обработки и предобработки данных перед анализом и обучением моделей машинного обучения.

    • get_duplicated_df: Поиск и обработка дубликатов
    • features_separate: Разделяет признаки на категориальные и числовые на основе порога уникальных значений
    • get_stratified_df: Добавляет в датафрейм стратификационные группы по квартилям указанного признака
    • df_scaling: Масштабирует числовые данные с использованием StandardScaler, MinMaxScaler, Normalizer, RobustScaler
    • drop_outliers_iso: Удаляет выбросы из данных с использованием метода IsolationForest
    • drop_outliers_tuk: Удаляет выбросы по методу Тьюки (IQR)
    • get_pca: Преобразует группы признаков с использованием PCA и добавляет результат в датафрейм
    • get_VIF: Вычисляет коэффициент инфляции дисперсии (VIF) для анализа мультиколлинеарности
    • plot_corrmatrix: Строит корреляционную матрицу и вычисляет ее ранг и детерминант
    • get_polyfeatures: Генерирует полиномиальные признаки
    • df_target_encoding: Выполняет целевое кодирование категориальных признаков с использованием TargetEncoder

    Модуль feature_select

    Предназначен для отбора значимых признаков в наборах данных

    • get_selected_features: Выполняет отбор признаков с использованием RFE или SFS, возвращая новый набор данных с выбранными переменными.
    • get_best_n_features: Оптимизирует количество признаков с помощью Optuna, проводя кросс-валидацию и выбирая наилучший набор переменных.
    • save_selected_features: Выполняет отбор признаков для нескольких датасетов и моделей, сохраняя результаты

    Модуль model_train

    Предназначен для обучения моделей машинного обучения, оценки их качества и анализа важности признаков.

    • get_feature_importance_df: Возвращает таблицу важности признаков для обученной модели
    • get_importances_barplot: Строит график важности признаков, используя коэффициенты модели и SHAP-значения.
    • get_feat_importance_arima: Анализирует важность признаков в модели SARIMAX
    • get_feature_contrib: Анализирует вклад признаков в предсказания линейных моделей
    • plot_ts_pred: Строит график предсказанных и фактических значений для временных рядов.
    • get_prediction: Возвращает датафрейм с метриками качества модели и массив предсказаний.
    • train_cv: Обучает модель с использованием различных схем кросс-валидации (KFold, LeaveOneOut, StratifiedKFold, TimeSeriesSplit)
    • arima_train: Автоматический подбор параметров и обучение SARIMAX модели для временных рядов.
    • arima_predict: Выполняет предсказание временного ряда с использованием обученной модели SARIMAX.

    Модуль model_tune

    Предназначен для оптимизации гиперпараметров моделей машинного обучения с использованием Optuna.

    • get_optimize_params: Выполняет подбор оптимальных гиперпараметров модели с использованием Optuna.
    • get_optimize_results: Запускает полный процесс оптимизации и последующего обучения модели с лучшими параметрами. Возвращает обученную модель, метрики и предсказания.
    • get_optimize_several_results: Оптимизирует несколько моделей на различных датасетах, сохраняя результаты.
    • get_best_study_params: Определяет лучшие гиперпараметры, отфильтровывая результаты по заданным критериям
    • optuna_plot: Визуализирует Pareto-графики, важность параметров и зависимость метрик от гиперпараметров.
    • mlflow_save_results: Логирует метрики и обученные модели в MLflow
    • get_prediction_df: Создает итоговый датафрейм с предсказаниями и ошибками модели

    Модуль model_tune_params

    Предназначен для управления гиперпараметрами моделей, используемых в процессе обучения и оптимизации. Служит справочником параметров, которые можно изменять и передавать в model_tune для автоматической оптимизации.

    • Класс ModelsParams: Хранит параметры моделей для оптимизации, включая диапазоны значений и базовые параметры. Поддерживаемые модели:

      • K-Nearest Neighbors (KNN)
      • Lasso, Ridge, ElasticNet
      • Huber Regressor
      • Stochastic Gradient Descent (SGD)
      • Support Vector Regressor (SVR)
      • Decision Trees (DT)
      • Random Forest (RF)
      • Extra Trees (EXTR)
      • XGBoost (XGB)
      • LightGBM (LGBM)
      • Stacking Regressor
      • Bayesian Ridge
      • Tweedie Regressor
      • Theil-Sen Regressor
      • ARD Regression
      • Passive Aggressive Regressor (PAR)
    • set_param: Позволяет изменять параметры модели перед их передачей в model_tune

    Модуль stat_tests

    Предназначен для проведения статистических тестов и анализа данных.

    • plot_test_hists: Строит гистограммы для двух выборок, позволяя визуально сравнить их распределения.
    • kolmog_smirn_test: Тест Колмогорова-Смирнова – проверяет, принадлежат ли две выборки одному распределению.
    • kraskel_wallis_test: Тест Краскела-Уоллиса – анализирует статистически значимые различия между независимыми выборками.
    • adfuller_test: Тест Дики-Фуллера (ADF) – проверяет временной ряд на стационарность.
    • kpss_test: KPSS-тест – альтернатива ADF для проверки стационарности временного ряда.
    • stationarity_test: Объединяет результаты ADF и KPSS, предоставляя комплексную оценку стационарности.
    • acf_pacf_plot: Строит автокорреляционную функцию (ACF) и частичную автокорреляционную функцию (PACF).

    Модуль utils_io

    Предназначен для работы с файлами и данными, включая сохранение и загрузку файлов в различных форматах (pickle, json), управление сервером MLflow, а также очистку логов в PostgreSQL.

    • save_data: Сохраняет данные (словарь с объектами) в указанную директорию в форматах pkl или json.
    • load_data: Загружает данные из указанной директории в форматах pkl или json.
    • mlflow_server_start: Запускает сервер MLflow для логирования экспериментов
    • mlflow_run_delete: Удаляет логи MLflow из базы данных PostgreSQL

    • data_proc_test.ipynb: Тестирование функций предобработки данных, включая обнаружение выбросов, масштабирование, кодирование категориальных признаков и анализ корреляции.

      • data_proc
      • stat_tests
      • utils_io
    • data_ts_test.ipynb: Анализ и обработка временных рядов, включая разложение сезонности, обучение моделей и оценку качества прогнозирования

      • model_train
    • feature_contribution.ipynb: Анализ вклада признаков в предсказания моделей с использованием методов интерпретируемости, таких как коэффициенты линейных моделей и SHAP-значения.

      • model_train
    • feature_select_test.ipynb: Проверка методов отбора признаков

      • feature_select
      • utils_io
    • model_tune_test.ipynb: Оптимизация гиперпараметров моделей с использованием Optuna, оценка качества моделей и сохранение лучших конфигураций.

      • model_tune
      • model_tune_params
      • model_train
      • utils_io
    • training_test.ipynb: Проверка функций обучения моделей, расчета метрик и визуализации предсказаний.

      • model_train
      • utils_io
    Visit original content creator repository https://github.com/NazarovMichail/ds_nms
  • whos-that-champion

    Who’s That Champion? – URF Version

    ‘Who’s That Champion? – URF Version’ is an interactive game and web application designed for the first Riot Games API Challenge.
    The app was chosen as a winning submission placing as a runner-up.

    The rules are simple:

    • Analyze the match details that are given to you.
    • Guess which champion the data is from (based soley on analysis, problem solving, and guesstimations).
    • See how many you can get right in a row, and brag to your friends!

    We have collected data from over 85,000 URF mode games, so you’re sure to get a unique match every time you play.

    Demo

    A demo for this project is no longer available.

    Version

    1.1.1

    Tech

    “Who’s That Champion?” was developed with the following tech stack:

    Backend

    A matchId daemon was created to fetch matchIds every time a new batch was available. It ran as a long running process until URF mode was
    made unavailable. Each matchId from a batch was stored as a document in a matchIds collection in the database.

    A match details daemon was created to retrieve the match details of every matchId found in the database via the Riot Games API. The necessary match
    data needed for the web app was parsed from the data returned from the Riot Games API and made into a document. This document was then stored in the
    matches collection in the database.

    A static data script was created and run one time. The script retrieved static data for champions, spells, and items via the Riot API.
    The necessary data for the web app was parsed and made into a document, which was then stored in the database to their respective collections. Namely, the champions, items, and spells collections of the database.

    Now that URF is over, none of these scripts need to be run, as all data is up to date in relation to the stored matches.

    Contributions

    This project is now open source now that the API Challenge is over.
    If you would like to contribute to this project please open an issue, or send a pull request.

    Disclaimer

    “Who’s That Champion?” isn’t endorsed by Riot Games and doesn’t reflect the views or opinions
    of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends
    and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.

    Visit original content creator repository
    https://github.com/taycaldwell/whos-that-champion

  • mmselfsup

     
    OpenMMLab website HOT      OpenMMLab platform TRY IT OUT
     

    PyPI docs badge codecov license open issues

    📘Documentation | 🛠️Installation | 👀Model Zoo | 🆕Update News | 🤔Reporting Issues

    🌟 MMPreTrain is a newly upgraded open-source framework for visual pre-training. It has set out to provide multiple powerful pre-trained backbones and support different pre-training strategies.

    👉 MMPreTrain 1.0 branch is in trial, welcome every to try it and discuss with us! 👈

    English | 简体中文

    Introduction

    MMSelfSup is an open source self-supervised representation learning toolbox based on PyTorch. It is a part of the OpenMMLab project.

    The master branch works with PyTorch 1.8 or higher.

    Major features

    • Methods All in One

      MMSelfsup provides state-of-the-art methods in self-supervised learning. For comprehensive comparison in all benchmarks, most of the pre-training methods are under the same setting.

    • Modular Design

      MMSelfSup follows a similar code architecture of OpenMMLab projects with modular design, which is flexible and convenient for users to build their own algorithms.

    • Standardized Benchmarks

      MMSelfSup standardizes the benchmarks including logistic regression, SVM / Low-shot SVM from linearly probed features, semi-supervised classification, object detection and semantic segmentation.

    • Compatibility

      Since MMSelfSup adopts similar design of modulars and interfaces as those in other OpenMMLab projects, it supports smooth evaluation on downstream tasks with other OpenMMLab projects like object detection and segmentation.

    What’s New

    MMSelfSup v1.0.0 was released based on main branch. Please refer to Migration Guide for more details.

    MMSelfSup v1.0.0 was released in 06/04/2023.

    • Support PixMIM.
    • Support DINO in projects/dino/.
    • Refactor file io interface.
    • Refine documentations.

    MMSelfSup v1.0.0rc6 was released in 10/02/2023.

    • Support MaskFeat with video dataset in projects/maskfeat_video/
    • Translate documentation to Chinese.

    MMSelfSup v1.0.0rc5 was released in 30/12/2022.

    • Support BEiT v2, MixMIM, EVA.
    • Support ShapeBias for model analysis
    • Add Solution of FGIA ACCV 2022 (1st Place)
    • Refactor t-SNE

    Please refer to Changelog for details and release history.

    Differences between MMSelfSup 1.x and 0.x can be found in Migration.

    Installation

    MMSelfSup depends on PyTorch, MMCV, MMEngine and MMClassification.

    Please refer to Installation for more detailed instruction.

    Get Started

    For tutorials, we provide User Guides for basic usage:

    Pretrain

    Downetream Tasks

    Useful Tools

    Advanced Guides and Colab Tutorials are also provided.

    Please refer to FAQ for frequently asked questions.

    Model Zoo

    Please refer to Model Zoo.md for a comprehensive set of pre-trained models and benchmarks.

    Supported algorithms:

    More algorithms are in our plan.

    Benchmark

    Benchmarks Setting
    ImageNet Linear Classification (Multi-head) Goyal2019
    ImageNet Linear Classification (Last)
    ImageNet Semi-Sup Classification
    Places205 Linear Classification (Multi-head) Goyal2019
    iNaturalist2018 Linear Classification (Multi-head) Goyal2019
    PASCAL VOC07 SVM Goyal2019
    PASCAL VOC07 Low-shot SVM Goyal2019
    PASCAL VOC07+12 Object Detection MoCo
    COCO17 Object Detection MoCo
    Cityscapes Segmentation MMSeg
    PASCAL VOC12 Aug Segmentation MMSeg

    Contributing

    We appreciate all contributions improving MMSelfSup. Please refer to Contribution Guides for more details about the contributing guideline.

    Acknowledgement

    MMSelfSup is an open source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks. We wish that the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and develop their own new algorithms.

    MMSelfSup originates from OpenSelfSup, and we appreciate all early contributions made to OpenSelfSup. A few contributors are listed here: Xiaohang Zhan (@XiaohangZhan), Jiahao Xie (@Jiahao000), Enze Xie (@xieenze), Xiangxiang Chu (@cxxgtxy), Zijian He (@scnuhealthy).

    Citation

    If you use this toolbox or benchmark in your research, please cite this project.

    @misc{mmselfsup2021,
        title={{MMSelfSup}: OpenMMLab Self-Supervised Learning Toolbox and Benchmark},
        author={MMSelfSup Contributors},
        howpublished={\url{https://github.com/open-mmlab/mmselfsup}},
        year={2021}
    }

    License

    This project is released under the Apache 2.0 license.

    Projects in OpenMMLab

    • MMEngine: OpenMMLab foundational library for training deep learning models.
    • MMCV: OpenMMLab foundational library for computer vision.
    • MMEval: A unified evaluation library for multiple machine learning libraries.
    • MIM: MIM installs OpenMMLab packages.
    • MMClassification: OpenMMLab image classification toolbox and benchmark.
    • MMDetection: OpenMMLab detection toolbox and benchmark.
    • MMDetection3D: OpenMMLab’s next-generation platform for general 3D object detection.
    • MMRotate: OpenMMLab rotated object detection toolbox and benchmark.
    • MMYOLO: OpenMMLab YOLO series toolbox and benchmark.
    • MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
    • MMOCR: OpenMMLab text detection, recognition, and understanding toolbox.
    • MMPose: OpenMMLab pose estimation toolbox and benchmark.
    • MMHuman3D: OpenMMLab 3D human parametric model toolbox and benchmark.
    • MMSelfSup: OpenMMLab self-supervised learning toolbox and benchmark.
    • MMRazor: OpenMMLab model compression toolbox and benchmark.
    • MMFewShot: OpenMMLab fewshot learning toolbox and benchmark.
    • MMAction2: OpenMMLab’s next-generation action understanding toolbox and benchmark.
    • MMTracking: OpenMMLab video perception toolbox and benchmark.
    • MMFlow: OpenMMLab optical flow toolbox and benchmark.
    • MMEditing: OpenMMLab image and video editing toolbox.
    • MMGeneration: OpenMMLab image and video generative models toolbox.
    • MMDeploy: OpenMMLab model deployment framework.
    Visit original content creator repository https://github.com/open-mmlab/mmselfsup
  • storyscript

    Storyscript Open Microservice

    This is the Storyscript compiler as as service

    Open Microservice Specification Version Open Microservices Spectrum Chat Open Microservices Code of Conduct Open Microservices Commitzen PRs Welcome License: MIT

    Introduction

    This project is an example implementation of the Open Microservice Specification, a standard originally created at Storyscript for building highly-portable “microservices” that expose the events, actions, and APIs inside containerized software.

    Getting Started

    The oms command-line interface allows you to interact with Open Microservices. If you’re interested in creating an Open Microservice the CLI also helps validate, test, and debug your oms.yml implementation!

    See the oms-cli project to learn more!

    Installation

    npm install -g @microservices/oms
    

    Usage

    Open Microservices CLI Usage

    Once you have the oms-cli installed, you can run any of the following commands from within this project’s root directory:

    Actions

    lex
    Action Arguments
    Argument Name Type Required Default Description
    files map true None No description provided.
    oms run lex \
        -a files='*****'
    parse
    Action Arguments
    Argument Name Type Required Default Description
    files map true None No description provided.
    oms run parse \
        -a files='*****'
    compile
    Action Arguments
    Argument Name Type Required Default Description
    files map true None No description provided.
    oms run compile \
        -a files='*****'
    grammar
    oms run grammar
    version
    oms run version

    Contributing

    All suggestions in how to improve the specification and this guide are very welcome. Feel free share your thoughts in the Issue tracker, or even better, fork the repository to implement your own ideas and submit a pull request.

    Edit storyscript on CodeSandbox

    This project is guided by Contributor Covenant. Please read out full Contribution Guidelines.

    Additional Resources

    Visit original content creator repository https://github.com/omsable/storyscript
  • V8Android

    V8Android

    A demo APP for embedding V8 engine in Android APP

    1.git clone https://github.com/cstsinghua/V8Android.git;

    2.(Optional)enter app/src/main/cpp/static_lib directory,unzip v8_arm_arm64.zip,then copy arm64-v8a and armeabi-v7a subdirs to app/src/main/jniLibs directory(overwrite the old files);

    3.open Android studio(version 3.1 is recommended),open and load this project;

    4.run it and view the result.(you can edit Java and native code if you will)

    背景

    最近公司的移动引擎(自研,用于公司的游戏APP开发,引擎核心采用C++开发,而游戏的UI和业务逻辑采用Lua语言开发)需要支持Javascript和Lua互相调用(支持Android和IOS两大平台)。刚开始的时候,没有什么头绪。由于之前实现过Lua和Android/IOS原生语言(API)即Java/Object-C的互调,其中Android平台交互原理大致如下图(本文主要基于Android平台讲解。IOS下,OC调用C++更简单,这里暂不赘述):

    由此,大概思考了下,如果要实现JavaScript和业务层的Lua互调,那么应该与上面的原理类似。这基于以下几点分析:

    1. Javascript和java一样,都是解释性语言,需要类似VM的虚拟机(一般采用C或C++语言实现)来执行。java世界里,JVM是我们所熟知的。而JS领域,在移动平台方面,除了大名鼎鼎的google的v8引擎,还有其他的一些JS引擎(相当于VM),比如JavaScriptCore、SpiderMonkey和Rhino(java实现,从这个角度看,Rhino似乎直接在Android上可以无缝对接)。关于JS引擎介绍,可以参见维基百科JavaScript_engine介绍
    2. 既然JS引擎是C/C++实现,在Android中,嵌入进引擎的so库中,便可实现JS与C++互调,而Lua语言天生就是C/C++的寄生语言,从而就可以建立JS和Lua互调的纽带。

    基于性能和平台适配考虑,最终选择v8作为Android平台的嵌入JS引擎,而JavaScriptCore作为IOS平台的嵌入引擎。本文主要讲解,如果从v8的源码构建出Android平台的嵌入库,然后通过Android NDK开发,进而实现在Android APP(非Hybrid应用,即不会通过Webview来运行JS代码)中运行JS代码,JS与C/C++、Lua互调。

    平台和环境的选择

    如果有过大型开源C++项目编译的经验,就知道,选择开发系统和环境是非常重要的,一般而言,在Windows下编译真的是非常艰难。所以文本先以Linux系统(这里选择Ubuntu)为例,讲解如何构建出适用于Android ARM架构的JS引擎嵌入静态库。再讲解Windows平台下的编译构建。

    注:v8的构建真的是非常复杂和繁琐的过程,各种坑,各种层出不穷的问题。另外一篇文章编译及嵌入v8遇到的错误汇总详细记录了学习v8构建过程中遇到的一些问题,以及分析和解决途径、链接等,以供探讨。

    Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)

    v8项目在Github的官方镜像地址为https://github.com/v8/v8。而其官方的wiki文档也在这个仓库中。但是如果直接按照这个wiki去构建,失败几乎是不可避免。因为wiki的步骤非常简化(当然先总体阅览一下wiki还是大有必要,而且当回过头来对照的时候将会发现”原来是这样,Soga^_^”),有些关键的环境配置和要点被省略掉,所以如果不跳过这些坑,将浪费大量的时间,甚至有很严重的挫败感。本文的目的就是为了对v8的构建做一个记录,总结遇到的问题,便于以后查阅,也为他人提供一个便捷的指引。

    这里,构建主机(Host)是Ubuntu 16.04系统,而目标平台(Target)是Linux/Mac x64。

    如果没有单独的Ubuntu主机,那么可以在Windows主机下安装virtual box或者VMware,建议安装virtualbox,相对来说更轻量级,这里足够满足需求。然后利用virtualbox加载Ubuntu 16.04的ISO镜像(可网上下载,或找CoulsonChen索取),创建虚拟机环境,即可在虚拟机环境下实现编译。

    具体步骤

    1. 安装Git,在终端里面输入下面命令:

      apt-get install git

    2. 安装depot_tools(详细可参见安装depot-tools),在终端输入下面命令:

      git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

      将depot_tools的目录添加到系统的PATH路径,可以将depot_tools所在的目录加入到~/.bashrc~/.zshrc(~代表当前用户目录,一般为/home/yourName/,即打开终端时候默认进入的目录),这样对当前用户的环境变量都生效了)。如果只是在当前终端环境下添加(假定depot_tools所在的目录为/path/to/depot_tools),则执行:

      export PATH=/path/to/depot_tools:$PATH

      depot_tools已经自带了GN工具(GYP从V8 6.5版本开始就不再使用。请使用GN代替)。V8的构建需要借助于GN。GN是一个元构建系统(meta build system of sorts),因为它为其他构建系统(比如ninja)生成构建文件(it generates build files for a number of other build systems)。也就是说,GYP和GN 并不是构建系统,V8使用的构建系统使用的是Ninja,而GN是用来生产Ninja构建文件的工具。

    3. 更新depot_tool工具,在终端输入如下命令(注意,该命令不带任何参数):

      gclient

      该步骤更新depot_tool工具,特别如果是Windows系统下面构建,这一步骤将会在depot_tool目录下下载Git和python(2.7版本)

    4. 选择一个目录(该目录用于存放下载v8的源码),比如/usr/local/v8/在该目录下打开终端,执行如下命令:

      fetch v8

      然后进入v8的源文件目录

      cd v8

    5. 步骤1-4确保工具和v8的源码下载完成,在执行第5步前,再次确认当前工作目录已经在v8的源目录下(步骤4中的示例来看的话,就是/usr/local/v8/v8/)。然后在当前工作目录(比如/usr/local/v8/v8/)下执行如下命令,该命令将会下载所有的构建依赖项(Download all the build dependencies)

      gclient sync

    6. (这一步只在linux系统构建时才需要执行,且只需要执行一次–(only on linux, only needed once) 安装构建依赖项:

      ./build/install-build-deps.sh

    7. 生成目标平台必需的构建文件(Generate the necessary build files by executing the following in your terminal/shell):

      tools/dev/v8gen.py x64.release

      注意:目标平台有很多,可以通过tools/dev/v8gen.py list命令查看。这里以本文写作时的master分支版本为例,执行tools/dev/v8gen.py list命令后,可以看到v8支持如下目标平台构建:

       coulsonchen@coulsonchen:/usr/local/v8/v8$ tools/dev/v8gen.py list
       android.arm.debug
       android.arm.optdebug
       android.arm.release
       arm.debug
       arm.optdebug
       arm.release
       arm64.debug
       arm64.optdebug
       arm64.release
       ia32.debug
       ia32.optdebug
       ia32.release
       mips64el.debug
       mips64el.optdebug
       mips64el.release
       mipsel.debug
       mipsel.optdebug
       mipsel.release
       ppc.debug
       ppc.optdebug
       ppc.release
       ppc64.debug
       ppc64.optdebug
       ppc64.release
       s390.debug
       s390.optdebug
       s390.release
       s390x.debug
       s390x.optdebug
       s390x.release
       x64.debug
       x64.optdebug
       x64.release
      
    8. 编译v8源码(Compile the source by executing the following in your terminal/shell):

      ninja -C out.gn/x64.release

      该命令是编译构建v8运行的所有文件(building all of V8 run (assuming gn generated to the x64.release folder))。编译完成之后,可以在/path/to/v8 Source dir/out.gn/x64.release目录(这里示例即/usr/local/v8/v8/out.gn/x64.release)及其子目录下查看构建产生的库和可执行文件。可进入该目录下,执行生成的d8可执行程序,进入javascript的交互命令行模式,示例如下图: 如果只需要编译构建指定的文件,比如d8(build specific targets like d8, add them to the command line)。则可执行如下命令(将要指定的构建文件添加到ninja命令的参数中):

      ninja -C out.gn/x64.release d8

    9. (可选,用于测试构建是否OK)执行测试(Run the tests by executing the following in your terminal/shell):

      tools/run-tests.py –gn

    Linux(Ubuntu 16.04)下构建用于Android arm版本的v8(可执行的二进制文件)

    这里,构建主机(Host)是Ubuntu 16.04系统,而目标平台(Target)是Android arm。由于构建平台和目标平台是不同的平台,因此这里,需要使用交叉编译(Cross compiling)

    前置条件,和Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)章节的1-6步完全一致。接下来,可参考Cross compiling for ARM

    这里单独对Cross compiling for ARM的步骤做下说明:

    1. 在配置好上述提到的环境之后,编辑.gclient配置文件(.gclient configuration file),位于用于存放下载v8的源码的目录,对应于Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)章节的步骤4中的说明,这里的目录路径示例为/usr/local/v8,如下图: 打开该文件,在末尾添加如下一行: target_os = ['android'] # Add this to get Android stuff checked out. 示例如下:

    2. 然后在v8的源码目录下(/usr/local/v8/v8),执行如下命令:

      gclient sync

      一旦配置了target_os = ['android'],再执行gclient sync,将会在v8的源码目录下下载Android相关的工具和文件,主要包括android_tools和android_ndk等(示例,对应目录/usr/local/v8/v8/third_party/android/android_tools/usr/local/v8/v8/third_party/android_ndk)。注意:这些文件非常大,有10G左右,所以需要下载很长时间,网络如果不好的话,会很痛苦

    3. 利用8gen.py生成ARM架构编译时必要的构建文件(和Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)章节的第7步类似)。在v8的源码目录下(/usr/local/v8/v8),执行如下命令:

      tools/dev/v8gen.py arm.release

    4. 然后,进入生成的arm.release子目录(示例,/usr/local/v8/v8/out.gn/arm.release),编辑其中的args.gn文件,在其中添加如下几行(如果要查看所有可配置的参数,可以先执行命令gn args out.gn/arm.release --list查看):

       target_os = "android" 
       target_cpu = "arm"  
       v8_target_cpu = "arm"
       is_component_build = false
      

      如果是arm64设备,则上面几行应该替换为:

       target_os = "android"     
       target_cpu = "arm64"
       v8_target_cpu = "arm64"
       is_component_build = false
      
    5. 编译构建。这一步与Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)章节的第8步类似。执行如下命令(构建全部目标文件):

      ninja -C out.gn/arm.release

      或(只构建d8)

      ninja -C out.gn/arm.release d8

    6. 构建完成后,可以将生成的d8及其相关文件push到Android手机中,体验一把,看看效果。可以通过adb工具来将文件push到手机(adb工具已经在步骤2完成后下载了,具体目录/usr/local/v8/v8/third_party/android_tools/sdk/platform-tools。当然你也可以直接通过sudo apt install android-tools-adb命令来额外安装adb。然后adb所在路径添加到PATH路径中)。在v8源文件目录下(/usr/local/v8/v8)执行如下命令:

      adb push out.gn/arm.release/d8 /data/local/tmp

      adb push out.gn/arm.release/natives_blob.bin /data/local/tmp

      adb push out.gn/arm.release/snapshot_blob.bin /data/local/tmp

      然后,通过adb shell进入到Android手机的交互shell中。

       > $ adb shell
       > $ cd /data/local/tmp
       > $ ls
           v8 natives_blob.bin snapshot_blob.bin
      
       > $ ./d8
       V8 version 5.8.0 (candidate)
       d8> 'w00t!'
       "w00t!"
       d8> 
      

    Linux(Ubuntu 16.04)下构建用于Android arm版本的v8(静态库,用于Android NDK链接和封装)

    注:已经有人在Github上提供编译好的v8静态库供Android NDK嵌入开发,这样可以节省很多时间(只是并非对应v8的最新版,不过也是次新版)。请参见https://github.com/social-games/CompiledV8

    首先理一下思路:

    1. 先利用交叉编译,构建出用于Android平台的v8静态库文件;
    2. 利用Android studio进行NDK开发,将步骤1中生成的静态库文件进行链接封装,向Java层暴露方法(对应java层的native方法),最终生成动态库文件;
    3. Android APP内部,原生的Java层可以通过JNI调用步骤2中生成的动态库中的方法(去加载JS代码并执行相关逻辑,然后返回相关数据,反之亦然)

    实施前的题外话: 如果是为了练练手,那么可以采用v8的最新master分支进行构建即可;但如果是为了用于生产环境,那么请一定采用最新的稳定版本来构建。怎么查询到最新的稳定版本是多少呢?请参见官方原文说明。本文写作时最新的适用于Android平台的分支是6.5.254.43。因此,在执行前,需要先逐一执行以下命令:

    git pull
    
    git checkout branch-heads/6.5
    
    gclient sync
    

    具体实施步骤:

    1. 首先与章节Linux(Ubuntu 16.04)下构建用于Android arm版本的v8(可执行的二进制文件)(#anchor2)的步骤基本一致,但需要在其第3步修改目标构建平台(即将arm.release改为android.arm.release),执行命令替换为:

      tools/dev/v8gen.py gen -m client.v8.ports -b “V8 Android Arm – builder” android.arm.release

    2. 首先与章节Linux(Ubuntu 16.04)下构建用于Android arm版本的v8(可执行的二进制文件)(#anchor2)的步骤基本一致,只是需要在其第4步修改下args.gn配置文件,如下:

       is_component_build = false
       is_debug = false
       symbol_level = 1
       target_cpu = "arm"
       target_os = "android"
       use_goma = false
       v8_android_log_stdout = true
       v8_enable_i18n_support = false
       v8_static_library = true
      

      注意:use_goma = false、v8_static_library = true、v8_enable_i18n_support = false都需要添加

    3. 然后重新执行构建,构建完成之后,在v8源码目录下的子目录out.gn/android.arm.release/obj下可以找到对应的静态库。然后按照这篇文章的步骤,将相关静态库和头文件聚合整理到一个单独的目录(比如libs,最终将libs目录copy到Android Studio的工程的cpp源文件目录下)。这里列出关键示例代码:

    	// Create fat lib files. 
    	// You also could add all .* files into one single library.
    	// 
    	cd out.gn/android_arm.release/obj
    	mkdir libs
    	cd libs
    	// one lib to rule them all.
    	ar -rcsD libv8_base.a ../v8_base/*.o
    	ar -rcsD libv8_base.a ../v8_libbase/*.o
    	ar -rcsD libv8_base.a ../v8_libsampler/*.o
    	ar -rcsD libv8_base.a ../v8_libplatform/*.o 
    	ar -rcsD libv8_base.a ../src/inspector/inspector/*.o
    	// preferred snapshot type: linked into binary.
    	ar -rcsD libv8_snapshot.a ../v8_snapshot/*.o 
    	// depending on snapshot options, you should left out 
    	// v8_snapshot files and include any of these other libs.
    	ar -rcsD libv8_nosnapshot.a ../v8_nosnapshot/*.o
    	ar -rcsD libv8_external_snapshot.a ../v8_external_snapshot/*.o
    	// source headers, for inspector compilation.
    	mkdir -p src/base/platform
    	cp -R ../../../../src/*.h ./src
    	cp -R ../../../../src/base/*.h ./src/base
    	cp -R ../../../../src/base/platform/*.h ./src/base/platform
    	// copy v8 compilation header files:
    	cp -R ../../../../include ./
    	// For compilation on Android, always **use the same ndk** as 
    	// `gclient sync` downloaded. 
    	// As of the time of this writing it was `ndk r12b`
    	// Enjoy v8 embedded in an Android app
    关于libv8_snapshot.a/libv8_nosnapshot.a/libv8_external_snapshot.a在使用的时候任选其一,这三者的区别如下:
    Currently, snapshots are compiled by default. These snapshots will contain base objects, like for example, Math. There’s no runtime difference among them, just different initialization times. In my nexus 5x, no snapshot takes around 400ms to initialize an Isolate and a Context, and around 30 with snapshot. The external snapshot and snapshot differ in that the external snapshot must be explicitly loaded (.bin files in the compilation output), and snapshot library is a static lib file of roughly 1Mb in size, that will be linked with the final .so file binary instead of externally loaded. Bear in mind that snapshot libs, internal or external, would require you to supply some extra native code for reading the Natives (.bin) files.
    
    1. 新创建一个Android Studio工程(支持C++,利用默认的向导创建完成即可。注:这里AS的版本是3.1,默认采用cmake构建C++代码),然后将步骤2得到的libs拷贝到工程的cpp源文件对应的目录下。然后就是编辑工程的CMakeLists.txt文件,将libs里面的静态库链接进来。具体代码和配置可以参考我的Github demo。另外也可参考这篇文章

    win10构建v8 engine的心路历程

    这里可以完全参照https://medium.com/dailyjs/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4这篇文章的步骤来完成。

    但需要强调的是,这篇文章编写的时候,当时的v8版本可以使用VS 2015编译,而v8的最新版本(截止到2018.4.4)要求VS 2017(随着时间推移,可能后续会要求更新版本的VS,这里就必须注意,可以在下载下来的v8源目录下面的build子目录下的vs_toolchain.py文件中查看默认的VS版本,如下图),所以这篇文章里面关于VS 2015的部分,请替换成VS 2017。另外,关于Windows SDK的部分,也请下载最新版本的。

    Visit original content creator repository https://github.com/cstsinghua/V8Android
  • V8Android

    V8Android

    A demo APP for embedding V8 engine in Android APP

    1.git clone https://github.com/cstsinghua/V8Android.git;

    2.(Optional)enter app/src/main/cpp/static_lib directory,unzip v8_arm_arm64.zip,then copy arm64-v8a and armeabi-v7a subdirs to app/src/main/jniLibs directory(overwrite the old files);

    3.open Android studio(version 3.1 is recommended),open and load this project;

    4.run it and view the result.(you can edit Java and native code if you will)

    背景

    最近公司的移动引擎(自研,用于公司的游戏APP开发,引擎核心采用C++开发,而游戏的UI和业务逻辑采用Lua语言开发)需要支持Javascript和Lua互相调用(支持Android和IOS两大平台)。刚开始的时候,没有什么头绪。由于之前实现过Lua和Android/IOS原生语言(API)即Java/Object-C的互调,其中Android平台交互原理大致如下图(本文主要基于Android平台讲解。IOS下,OC调用C++更简单,这里暂不赘述):

    由此,大概思考了下,如果要实现JavaScript和业务层的Lua互调,那么应该与上面的原理类似。这基于以下几点分析:

    1. Javascript和java一样,都是解释性语言,需要类似VM的虚拟机(一般采用C或C++语言实现)来执行。java世界里,JVM是我们所熟知的。而JS领域,在移动平台方面,除了大名鼎鼎的google的v8引擎,还有其他的一些JS引擎(相当于VM),比如JavaScriptCore、SpiderMonkey和Rhino(java实现,从这个角度看,Rhino似乎直接在Android上可以无缝对接)。关于JS引擎介绍,可以参见维基百科JavaScript_engine介绍
    2. 既然JS引擎是C/C++实现,在Android中,嵌入进引擎的so库中,便可实现JS与C++互调,而Lua语言天生就是C/C++的寄生语言,从而就可以建立JS和Lua互调的纽带。

    基于性能和平台适配考虑,最终选择v8作为Android平台的嵌入JS引擎,而JavaScriptCore作为IOS平台的嵌入引擎。本文主要讲解,如果从v8的源码构建出Android平台的嵌入库,然后通过Android NDK开发,进而实现在Android APP(非Hybrid应用,即不会通过Webview来运行JS代码)中运行JS代码,JS与C/C++、Lua互调。

    平台和环境的选择

    如果有过大型开源C++项目编译的经验,就知道,选择开发系统和环境是非常重要的,一般而言,在Windows下编译真的是非常艰难。所以文本先以Linux系统(这里选择Ubuntu)为例,讲解如何构建出适用于Android ARM架构的JS引擎嵌入静态库。再讲解Windows平台下的编译构建。

    注:v8的构建真的是非常复杂和繁琐的过程,各种坑,各种层出不穷的问题。另外一篇文章编译及嵌入v8遇到的错误汇总详细记录了学习v8构建过程中遇到的一些问题,以及分析和解决途径、链接等,以供探讨。

    Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)

    v8项目在Github的官方镜像地址为https://github.com/v8/v8。而其官方的wiki文档也在这个仓库中。但是如果直接按照这个wiki去构建,失败几乎是不可避免。因为wiki的步骤非常简化(当然先总体阅览一下wiki还是大有必要,而且当回过头来对照的时候将会发现”原来是这样,Soga^_^”),有些关键的环境配置和要点被省略掉,所以如果不跳过这些坑,将浪费大量的时间,甚至有很严重的挫败感。本文的目的就是为了对v8的构建做一个记录,总结遇到的问题,便于以后查阅,也为他人提供一个便捷的指引。

    这里,构建主机(Host)是Ubuntu 16.04系统,而目标平台(Target)是Linux/Mac x64。

    如果没有单独的Ubuntu主机,那么可以在Windows主机下安装virtual box或者VMware,建议安装virtualbox,相对来说更轻量级,这里足够满足需求。然后利用virtualbox加载Ubuntu 16.04的ISO镜像(可网上下载,或找CoulsonChen索取),创建虚拟机环境,即可在虚拟机环境下实现编译。

    具体步骤

    1. 安装Git,在终端里面输入下面命令:

      apt-get install git

    2. 安装depot_tools(详细可参见安装depot-tools),在终端输入下面命令:

      git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

      将depot_tools的目录添加到系统的PATH路径,可以将depot_tools所在的目录加入到~/.bashrc~/.zshrc(~代表当前用户目录,一般为/home/yourName/,即打开终端时候默认进入的目录),这样对当前用户的环境变量都生效了)。如果只是在当前终端环境下添加(假定depot_tools所在的目录为/path/to/depot_tools),则执行:

      export PATH=/path/to/depot_tools:$PATH

      depot_tools已经自带了GN工具(GYP从V8 6.5版本开始就不再使用。请使用GN代替)。V8的构建需要借助于GN。GN是一个元构建系统(meta build system of sorts),因为它为其他构建系统(比如ninja)生成构建文件(it generates build files for a number of other build systems)。也就是说,GYP和GN 并不是构建系统,V8使用的构建系统使用的是Ninja,而GN是用来生产Ninja构建文件的工具。

    3. 更新depot_tool工具,在终端输入如下命令(注意,该命令不带任何参数):

      gclient

      该步骤更新depot_tool工具,特别如果是Windows系统下面构建,这一步骤将会在depot_tool目录下下载Git和python(2.7版本)

    4. 选择一个目录(该目录用于存放下载v8的源码),比如/usr/local/v8/在该目录下打开终端,执行如下命令:

      fetch v8

      然后进入v8的源文件目录

      cd v8

    5. 步骤1-4确保工具和v8的源码下载完成,在执行第5步前,再次确认当前工作目录已经在v8的源目录下(步骤4中的示例来看的话,就是/usr/local/v8/v8/)。然后在当前工作目录(比如/usr/local/v8/v8/)下执行如下命令,该命令将会下载所有的构建依赖项(Download all the build dependencies)

      gclient sync

    6. (这一步只在linux系统构建时才需要执行,且只需要执行一次–(only on linux, only needed once) 安装构建依赖项:

      ./build/install-build-deps.sh

    7. 生成目标平台必需的构建文件(Generate the necessary build files by executing the following in your terminal/shell):

      tools/dev/v8gen.py x64.release

      注意:目标平台有很多,可以通过tools/dev/v8gen.py list命令查看。这里以本文写作时的master分支版本为例,执行tools/dev/v8gen.py list命令后,可以看到v8支持如下目标平台构建:

       coulsonchen@coulsonchen:/usr/local/v8/v8$ tools/dev/v8gen.py list
       android.arm.debug
       android.arm.optdebug
       android.arm.release
       arm.debug
       arm.optdebug
       arm.release
       arm64.debug
       arm64.optdebug
       arm64.release
       ia32.debug
       ia32.optdebug
       ia32.release
       mips64el.debug
       mips64el.optdebug
       mips64el.release
       mipsel.debug
       mipsel.optdebug
       mipsel.release
       ppc.debug
       ppc.optdebug
       ppc.release
       ppc64.debug
       ppc64.optdebug
       ppc64.release
       s390.debug
       s390.optdebug
       s390.release
       s390x.debug
       s390x.optdebug
       s390x.release
       x64.debug
       x64.optdebug
       x64.release
      
    8. 编译v8源码(Compile the source by executing the following in your terminal/shell):

      ninja -C out.gn/x64.release

      该命令是编译构建v8运行的所有文件(building all of V8 run (assuming gn generated to the x64.release folder))。编译完成之后,可以在/path/to/v8 Source dir/out.gn/x64.release目录(这里示例即/usr/local/v8/v8/out.gn/x64.release)及其子目录下查看构建产生的库和可执行文件。可进入该目录下,执行生成的d8可执行程序,进入javascript的交互命令行模式,示例如下图: 如果只需要编译构建指定的文件,比如d8(build specific targets like d8, add them to the command line)。则可执行如下命令(将要指定的构建文件添加到ninja命令的参数中):

      ninja -C out.gn/x64.release d8

    9. (可选,用于测试构建是否OK)执行测试(Run the tests by executing the following in your terminal/shell):

      tools/run-tests.py –gn

    Linux(Ubuntu 16.04)下构建用于Android arm版本的v8(可执行的二进制文件)

    这里,构建主机(Host)是Ubuntu 16.04系统,而目标平台(Target)是Android arm。由于构建平台和目标平台是不同的平台,因此这里,需要使用交叉编译(Cross compiling)

    前置条件,和Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)章节的1-6步完全一致。接下来,可参考Cross compiling for ARM

    这里单独对Cross compiling for ARM的步骤做下说明:

    1. 在配置好上述提到的环境之后,编辑.gclient配置文件(.gclient configuration file),位于用于存放下载v8的源码的目录,对应于Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)章节的步骤4中的说明,这里的目录路径示例为/usr/local/v8,如下图: 打开该文件,在末尾添加如下一行: target_os = ['android'] # Add this to get Android stuff checked out. 示例如下:

    2. 然后在v8的源码目录下(/usr/local/v8/v8),执行如下命令:

      gclient sync

      一旦配置了target_os = ['android'],再执行gclient sync,将会在v8的源码目录下下载Android相关的工具和文件,主要包括android_tools和android_ndk等(示例,对应目录/usr/local/v8/v8/third_party/android/android_tools/usr/local/v8/v8/third_party/android_ndk)。注意:这些文件非常大,有10G左右,所以需要下载很长时间,网络如果不好的话,会很痛苦

    3. 利用8gen.py生成ARM架构编译时必要的构建文件(和Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)章节的第7步类似)。在v8的源码目录下(/usr/local/v8/v8),执行如下命令:

      tools/dev/v8gen.py arm.release

    4. 然后,进入生成的arm.release子目录(示例,/usr/local/v8/v8/out.gn/arm.release),编辑其中的args.gn文件,在其中添加如下几行(如果要查看所有可配置的参数,可以先执行命令gn args out.gn/arm.release --list查看):

       target_os = "android" 
       target_cpu = "arm"  
       v8_target_cpu = "arm"
       is_component_build = false
      

      如果是arm64设备,则上面几行应该替换为:

       target_os = "android"     
       target_cpu = "arm64"
       v8_target_cpu = "arm64"
       is_component_build = false
      
    5. 编译构建。这一步与Linux(Ubuntu 16.04)下构建用于Linux/Mac x64版本的v8(可执行的二进制文件)章节的第8步类似。执行如下命令(构建全部目标文件):

      ninja -C out.gn/arm.release

      或(只构建d8)

      ninja -C out.gn/arm.release d8

    6. 构建完成后,可以将生成的d8及其相关文件push到Android手机中,体验一把,看看效果。可以通过adb工具来将文件push到手机(adb工具已经在步骤2完成后下载了,具体目录/usr/local/v8/v8/third_party/android_tools/sdk/platform-tools。当然你也可以直接通过sudo apt install android-tools-adb命令来额外安装adb。然后adb所在路径添加到PATH路径中)。在v8源文件目录下(/usr/local/v8/v8)执行如下命令:

      adb push out.gn/arm.release/d8 /data/local/tmp

      adb push out.gn/arm.release/natives_blob.bin /data/local/tmp

      adb push out.gn/arm.release/snapshot_blob.bin /data/local/tmp

      然后,通过adb shell进入到Android手机的交互shell中。

       > $ adb shell
       > $ cd /data/local/tmp
       > $ ls
           v8 natives_blob.bin snapshot_blob.bin
      
       > $ ./d8
       V8 version 5.8.0 (candidate)
       d8> 'w00t!'
       "w00t!"
       d8> 
      

    Linux(Ubuntu 16.04)下构建用于Android arm版本的v8(静态库,用于Android NDK链接和封装)

    注:已经有人在Github上提供编译好的v8静态库供Android NDK嵌入开发,这样可以节省很多时间(只是并非对应v8的最新版,不过也是次新版)。请参见https://github.com/social-games/CompiledV8

    首先理一下思路:

    1. 先利用交叉编译,构建出用于Android平台的v8静态库文件;
    2. 利用Android studio进行NDK开发,将步骤1中生成的静态库文件进行链接封装,向Java层暴露方法(对应java层的native方法),最终生成动态库文件;
    3. Android APP内部,原生的Java层可以通过JNI调用步骤2中生成的动态库中的方法(去加载JS代码并执行相关逻辑,然后返回相关数据,反之亦然)

    实施前的题外话: 如果是为了练练手,那么可以采用v8的最新master分支进行构建即可;但如果是为了用于生产环境,那么请一定采用最新的稳定版本来构建。怎么查询到最新的稳定版本是多少呢?请参见官方原文说明。本文写作时最新的适用于Android平台的分支是6.5.254.43。因此,在执行前,需要先逐一执行以下命令:

    git pull
    
    git checkout branch-heads/6.5
    
    gclient sync
    

    具体实施步骤:

    1. 首先与章节Linux(Ubuntu 16.04)下构建用于Android arm版本的v8(可执行的二进制文件)(#anchor2)的步骤基本一致,但需要在其第3步修改目标构建平台(即将arm.release改为android.arm.release),执行命令替换为:

      tools/dev/v8gen.py gen -m client.v8.ports -b “V8 Android Arm – builder” android.arm.release

    2. 首先与章节Linux(Ubuntu 16.04)下构建用于Android arm版本的v8(可执行的二进制文件)(#anchor2)的步骤基本一致,只是需要在其第4步修改下args.gn配置文件,如下:

       is_component_build = false
       is_debug = false
       symbol_level = 1
       target_cpu = "arm"
       target_os = "android"
       use_goma = false
       v8_android_log_stdout = true
       v8_enable_i18n_support = false
       v8_static_library = true
      

      注意:use_goma = false、v8_static_library = true、v8_enable_i18n_support = false都需要添加

    3. 然后重新执行构建,构建完成之后,在v8源码目录下的子目录out.gn/android.arm.release/obj下可以找到对应的静态库。然后按照这篇文章的步骤,将相关静态库和头文件聚合整理到一个单独的目录(比如libs,最终将libs目录copy到Android Studio的工程的cpp源文件目录下)。这里列出关键示例代码:

    	// Create fat lib files. 
    	// You also could add all .* files into one single library.
    	// 
    	cd out.gn/android_arm.release/obj
    	mkdir libs
    	cd libs
    	// one lib to rule them all.
    	ar -rcsD libv8_base.a ../v8_base/*.o
    	ar -rcsD libv8_base.a ../v8_libbase/*.o
    	ar -rcsD libv8_base.a ../v8_libsampler/*.o
    	ar -rcsD libv8_base.a ../v8_libplatform/*.o 
    	ar -rcsD libv8_base.a ../src/inspector/inspector/*.o
    	// preferred snapshot type: linked into binary.
    	ar -rcsD libv8_snapshot.a ../v8_snapshot/*.o 
    	// depending on snapshot options, you should left out 
    	// v8_snapshot files and include any of these other libs.
    	ar -rcsD libv8_nosnapshot.a ../v8_nosnapshot/*.o
    	ar -rcsD libv8_external_snapshot.a ../v8_external_snapshot/*.o
    	// source headers, for inspector compilation.
    	mkdir -p src/base/platform
    	cp -R ../../../../src/*.h ./src
    	cp -R ../../../../src/base/*.h ./src/base
    	cp -R ../../../../src/base/platform/*.h ./src/base/platform
    	// copy v8 compilation header files:
    	cp -R ../../../../include ./
    	// For compilation on Android, always **use the same ndk** as 
    	// `gclient sync` downloaded. 
    	// As of the time of this writing it was `ndk r12b`
    	// Enjoy v8 embedded in an Android app
    关于libv8_snapshot.a/libv8_nosnapshot.a/libv8_external_snapshot.a在使用的时候任选其一,这三者的区别如下:
    Currently, snapshots are compiled by default. These snapshots will contain base objects, like for example, Math. There’s no runtime difference among them, just different initialization times. In my nexus 5x, no snapshot takes around 400ms to initialize an Isolate and a Context, and around 30 with snapshot. The external snapshot and snapshot differ in that the external snapshot must be explicitly loaded (.bin files in the compilation output), and snapshot library is a static lib file of roughly 1Mb in size, that will be linked with the final .so file binary instead of externally loaded. Bear in mind that snapshot libs, internal or external, would require you to supply some extra native code for reading the Natives (.bin) files.
    
    1. 新创建一个Android Studio工程(支持C++,利用默认的向导创建完成即可。注:这里AS的版本是3.1,默认采用cmake构建C++代码),然后将步骤2得到的libs拷贝到工程的cpp源文件对应的目录下。然后就是编辑工程的CMakeLists.txt文件,将libs里面的静态库链接进来。具体代码和配置可以参考我的Github demo。另外也可参考这篇文章

    win10构建v8 engine的心路历程

    这里可以完全参照https://medium.com/dailyjs/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4这篇文章的步骤来完成。

    但需要强调的是,这篇文章编写的时候,当时的v8版本可以使用VS 2015编译,而v8的最新版本(截止到2018.4.4)要求VS 2017(随着时间推移,可能后续会要求更新版本的VS,这里就必须注意,可以在下载下来的v8源目录下面的build子目录下的vs_toolchain.py文件中查看默认的VS版本,如下图),所以这篇文章里面关于VS 2015的部分,请替换成VS 2017。另外,关于Windows SDK的部分,也请下载最新版本的。

    Visit original content creator repository https://github.com/cstsinghua/V8Android
  • zlig

    zlig

    project overview

    This project represents a japanese style idle game.

    Short project name: zlig (stands for zen-landscape-idle-game)

    Current deployment on:

    Sponsoring

    If you like this project and want to support us, we would be very happy to see you as a sponsor on GitHub ❤️
    You can find the Sponsor button on the top right of the GitHub project page.
    Thanks a lot for the support <3

    dev

    commands

    • cleanup
      • sudo rm -rf build dist .output .data
      • sudo rm -rf node_modules

    initial setup

    VM ID

    Development VM ID from Thorsten for this project: 014
    (Only interesting to him.)

    system requirements for developing

    The following softwares are required for development:
    (The versions listed were the ones I most recently used for development and testing. So try sticking with them.)

    software command for version output my version at last use information
    Ubuntu lsb_release -a or cat /etc/os-release 22.04.4 LTS OS
    Linux uname -r 5.15.0-125-generic Linux Kernel
    VSCode code -v 1.93.2 IDE
    nvm nvm -v v0.40.1 Node Version Manager
    Node node -v (old nodejs --version) v22.13.0 NodeJS/ Node.js
    npm npm -v v10.9.2
    npx npx -v v10.9.2
    pnpm pnpm -v v10.0.0

    In the browser install:

    project setup

    1. execute a git pull
    2. open project in VSCode
    3. If you work with VSCode via remote software:
      • {Ctrl}+{Shift}+{P} -> >Preferences: Open Settings (UI) -> search for keyboard.dispatch and set it to keyCode
      • Restart or reload VSCode.
    4. Install recommended extensions/ plugins:
      • Open Extensions menu in VSCode ({Ctrl}+{Shift}+{X})
      • type in the search @recommended
      • install and enable the plugins
      • see file .vscode/extensions.json for configuring some of the extensions
      • Restart or reload VSCode.
    5. In VSCode on the bottom left click your profile image and log in all services (GitHub due to VSCode extensions, …)
      If the browser to VSCode callback fails, wait for the login popup on the bottom right to timeout (ca. 5 minutes) and
      then on the upcoming popup question You have not yet finished authorizing [...] Would you like to try a different way? (local server) click Yes and use this alternative login mechanic.
      (When you do not want to wait for the timeout to happen, you can also click the Cancel to trigger the dialog faster.)
    6. Install dependencies: pnpm i
    7. Happy coding <3

    namings

    • we use build area and building area (not building lot nor building place).

    lint and prettier

    This project uses antfu/eslint-config for eslint most of the files.
    The following extend it:

    Keep in mind that the plugin names are renamed, see
    Plugins Rename, e.g.:

    -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
    +// eslint-disable-next-line ts/consistent-type-definitions
    type foo = { bar: 2 }

    Why I don’t use Prettier for every file type

    Design

    used icon collections

    This project uses the following icon collections in descending order, try sticking to them and use from top to bottom.
    Tipp: Favorite them and use the search over all item collections at once: https://icon-sets.iconify.design/?list=favorite

    full name shorthand license note
    phosphor ph MIT
    Material Design Icons mdi Apache 2.0 (commercial use is allowed, no attribution required)
    Material Line Icons line-md MIT animated icons

    glTF export with draco compression

    Use draco compression in Blender on
    glTF 2 files:

    1. Create the model in blender
    2. Go to File -> Export -> glTF 2.0 (.glb/.gltf)
    3. In the right side panel
      1. set Format to glTF Seperate (.gltf + .bin + textures)
      2. set Remember Export Settings to true
      3. under Data set Compression to true
      4. under Compression set the compression level between 0-6 (0=less compression; 6=strongest compression)
        I am using 6 most of the time – only when morphing between models, this should be set to 0.

    TresJS & ThreeJS

    possible import locations

    Do not import from three directly but from the direct source instead. Example:

    -import { MeshLambertMaterial } from 'three'
    +import { MeshLambertMaterial } from 'three/src/materials/MeshLambertMaterial.js'

    Seems to work for types, but better use the direct import from the source folder (see above):

    <script setup lang="ts">
    import type * as THREE from 'three'
    </script>

    <script setup lang="ts">
    import { something } from '@tresjs/cientos'
    import { something } from '@tresjs/core'
    // import { something } from '@tresjs/nuxt'
    // import { something } from '@tresjs/post-processing'
    import { something } from 'three'
    import { something } from 'three/src/[...].js'
    import { something } from 'three-stdlib'
    </script>

    import and use *.gltf model files

    Method 1: With direct useGLTF

    <script setup lang="ts">
    import useGLTF from '@/composables/useGLTF.js'
    
    const { scenes } = await useGLTF('/MyModel/MyModel.gltf')
    </script>
    
    <template>
      <primitive :object="scenes.someScene" />
    </template>
    • All *.gltf models, along with their corresponding *.bin and texture files, are located in /public/.
      The useGLTF fetches it over HTTP
    • Bc of gltf-files present in the public folder, all gltf files are always bundled in the final app on build,
      regardless whether they are used or not.
    • no types
    • Direct call of useGLTF, no extra layers or wrappers

    Method 2: With generated helper wrappers and type definitions

    <script setup lang="ts">
    import modelLoader from '@/assets/models/someSubfolder/someModel.gltf'
    
    const { scenes } = await modelLoader
    </script>
    
    <template>
      <primitive :object="scenes.someScene" />
    </template>
    • All *.gltf models, along with their corresponding *.bin and texture files, are located in /src/assets/models/.

    • To generate helper wrappers and type definitions, run:

      pnpm run generate:gltf-models

      This script scans all model files in the source folder, deconstructs the GLTF JSON representation, and places
      the generated types in ./node_modules/.tmp/model-types/, ensuring only imported models are included in the
      final product.

      The script runs automatically:

      • always a .gltf file changes
      • before a dev run
      • before a build
      • after pnpm i
    • Nearly type safe GLTF file representations.
      Importing models is type-safe, and builds will fail if a model is missing.

    • Only the used models are bundled in the final product.

    • On runtime: Runs useGLTF under the hood. So 100% correct objects and usage, no extra layer.
      In dev: Scans the *.gltf file on its own, so the generated typing has redundant code and could be different
      from what is present on runtime. So be careful when using and test/ double check it!
      Example: In gltfModel.scenes.someScene.traversed.Object the typing only hints real objects and not each
      primitive that is used to build up the objects. But in runtime these primitives are also present in the
      traversed.Object – but funnily enough not all … that is the reason I left away all primitives, just to be sure.

    Multiple instances of the same model

    For already loaded and parsed models the GLTF loader returns a cached version. So primitive uses then the same
    model which means the single instance is unmounted and mounted again with other coordinates.

    Solution: clone it

    <script setup lang="ts">
    // ...
    const model = scenes.someScene.Object.someObject.clone()
    </script>
    
    <template>
      <primitive :object="model" />
    </template>

    real time shadows

    Example shadow configuration below.
    The so generated shadows currently have heavy artifacts, so we bake the shadows in this project.
    But here is an example configuration for shadows:

    script setup lang="ts"> import { DirectionalLightShadow } from 'three/src/lights/DirectionalLightShadow.js' nodes.MyObject.castShadow = true nodes.MyObject.receiveShadow = true nodes.MyGroundPlane.receiveShadow = true const directionalLightShadow = new DirectionalLightShadow() directionalLightShadow.mapSize.width = 4096 directionalLightShadow.mapSize.height = 4096 directionalLightShadow.normalBias = 0.1 directionalLightShadow.bias = 0.002 </script> <template> <Suspense> <TresCanvas shadows> <!-- ... --> <TresDirectionalLight cast-shadow :intensity="3.0" :position="[4, 8, 4]" :shadow="directionalLightShadow" /> <TresAmbientLight :intensity="0.3" /> <!-- ... --> </TresCanvas> </Suspense> </template>

    postprocessing

    Normally, you could use the packages @tresjs/post-processing and postprocessing in combination for postprocessing
    TresJS/ ThreeJS. Unfortunately, they are currently not compatible with TresJS core >v4, see
    comment on issue #16 and
    issue #32.

    Docs and helper websites

    prod

    Will use the build command out of /package.json.
    Building, deploying and hosting is done via Vercel.

    Attribution/ Contribution

    Project founder & head of project:

    Honorable mentions to people that helped this project:

    • Andreas Fehn helped with the project. Thank you <3
    • Moritz Starke helped with general 3D and Blender questions. Thanks mate <3
    • gundul0 helped with the island’s design concept and overall concept ideas. Thanks a lot <3

    Respectable mentions to projects that helped this project:

    • [currently none]

    Used programs/ softwares, services and dependencies – besides the ones in ./package.json:

    • GitHub Copilot was used in private mode for programming questions.
    • Blender was used as software for creating and editing 3D models.
    • ChatGPT used for DALL-E image generation, text based questions and programming code generation.

    Used assets/ materials including images and 3D models:

    • Internally identified with ID 14:
      • Name: Nature Kit
      • Cost: free
      • License: CC0 1.0 (commercial use allowed, no credits needed)
      • Author: Kenney
      • Downloaded:
        • Date: 2025-03-04
        • From: kenney
    • Internally identified with ID 19:
      • Name: KayKit - Medieval Hexagon Pack
      • Cost: free
      • License: CC0 1.0 (commercial use allowed, no credits needed)
      • Author: Kay Lousberg
      • Downloaded:

    License

    Copyright (c) 2024-present, Thorsten Seyschab

    This project, including original code and models, is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0). Under this license, others are allowed to remix, adapt, and build upon this work non-commercially, provided they credit the project founder and license any derivative works under the same terms.

    Please note that this license applies only to the original content authored by the project’s creators. Third-party libraries, assets, 3D models, and other materials utilized in this project are listed under “Attribution/ Contribution” above and remain the property of their original creators, licensed under their respective terms.

    The project founder reserves the right to modify the terms of this license or to offer different licensing arrangements for specific use cases.

    For the full license text, please see the LICENSE file.

    Need a Different License?

    If you are interested in discussing a different licensing arrangement for individual use cases, please feel free to reach out. Custom licensing may be available, but it is not guaranteed.

    Visit original content creator repository
    https://github.com/toddeTV/zlig

  • django-qa

    Visit original content creator repository
    https://github.com/swappsco/django-qa