Skip to content

Examples

aimspot edited this page Aug 16, 2023 · 11 revisions

API example

  1. Download the repository and install dependencies
!git clone https://github.com/saaresearch/ODRS.git
%cd ODRS/
!pip install -r requirements.txt 
%cd ..
``` python
2. To use our recommender system, run the following code:
 * job - current task (ml_recommend / object_detection);
 * path - Path to a set of images in yolo format;
 * classes - The name of the txt file containing the name of the classes;
 * gpu - The model will be used on GPU or CPU (True / False);
 * accuracy - If you want max accuracy choose 10. For lower accuracy 1 (1 - 10);
 * speed - If you want max speed choose 5. For lower speed 1 (1 - 5);

from ODRS.ODRS.api.odrs import ODRS odrs = ODRS(job="ml_recommend", data_path='/media/farm/ssd_1_tb_evo_sumsung/ODRS/user_datasets/yolo/Aerial_Maritime', classes="classes.txt", gpu=True, accuracy=10, speed=1) odrs.fit()

3. 

Clone this wiki locally