Coder Social home page Coder Social logo

ai-expert-04 / road_object_detection Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 151 KB

Object recognition AI using deep learning

License: GNU General Public License v3.0

Python 100.00%
classification cnn dection deep-learning mobilenet retinanet rmsprop sgd-optimizer yolov3

road_object_detection's Introduction

# Road_Object-Detection

Documentation

See the for full documentation on training, testing and deployment. See below for quickstart examples.

Install

Hi, if you want to see the video of the result of this project, click the link!

YouTube Link

Clone repo and install requirements.txt in a Python>=3.7.0 environment, including PyTorch>=1.7.

>>> git clone https://github.com/AI-Expert-04/Road_Object_Detection.git  # clone
>>> conda create —name Road_Object-Detection-env python=3.8
>>> conda activate Road_Object-Detection-env
Pycharm Termainal >>> pip install -r requirements.txt # install
  1. DBB100K data 다운 / DBB100K data Link / Video data Link

  2. yolov3 and Ration Net Model 다운 / models Link

yolov 학습

model : MabileNet weight : imagenet optimizer : SGD

    model = tf.keras.applications.MobileNet(weights='imagenet', include_top=False,  input_shape=(224, 224, 3))
    model.trainable = False # 1000개의 가중치를 학습하지 않음.

    model = tf.keras.Sequential([
        model, # imageNet 전이 학습 Input_layer
        # Convolution Neural Network (Convolution 신경망)
        tf.keras.layers.Conv2D(1024, (3, 3), padding = 'SAME'), # padding 사용해 필터를 줄임
        tf.keras.layers.Conv2D(1024, (3, 3), padding='SAME'), # padding 한번 더해 필터를 더 줄임
        tf.keras.layers.GlobalAveragePooling2D(), # 필터에 사용될 Parameter 수를 줄여 차원을 감소 즉 2차원
        ## hidden_layer1 ~ hidden_layer2
        # 완전 연결 신경망
        tf.keras.layers.Dense(4096), # 1024 -> 4096(hidden_layer1)
        tf.keras.layers.Dense(735), # 4096(hidden_layer1) -> 735(hidden_layer2)
        tf.keras.layers.Reshape((7, 7, 15)) # 필터를 다시 되돌림. Output_layer
    ]); model.summary()

    if not os.path.exists('../logs'):
        os.mkdir('../logs')

    tensorboard = tf.keras.callbacks.TensorBoard(log_dir='../logs')

    # SGD(Stochastic Gradient Decent) 확률적 경사 하강법
    optimizer = tf.keras.optimizers.SGD(learning_rate=0.000001, momentum=0.9) # 최적화 함수
    model.compile(loss=yolo_multitask_loss, optimizer=optimizer, run_eagerly=True) # 실패 함수
    model.fit(images, labels, epochs=5, verbose=1, callbacks=[tensorboard]) # 학습
    if not os.path.exists('../models'):
        os.mkdir('../models')

    model.save('../models/yolo_trained.h5')

Retina 학습.

model.fit(
    train_dataset.take(10),
    validation_data=val_dataset.take(5),
    epochs=epochs,
    callbacks=callbacks_list,
    verbose=1,
)   

report Link

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.