Pull to refresh
7
Андрей Рыбин@andrybin

User

6
Subscribers
Send message
_, buffer = cv2.imencode('.jpg', latest_image)
image_base64 = base64.b64encode(buffer).decode("utf-8")

# Create the current frame message
current_frame_message = {
    "role": "user",
    "content": [
        {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{image_base64}"}},
        {"type": "text", "text": "What do you see in this frame? Explain your decision and add to your answer '<GO>' or '<STOP>'"}
    ]
}

# Build messages array with conversation history
messages = list(self.conversation_history)

# Add context message if this isn't the first frame
if self.robot_state['frames_processed'] > 0:
    context_message = self.create_context_message()
    messages.append(context_message)

# Add current frame
messages.append(current_frame_message)

# Send to OpenAI API with full conversation context
response = self.openai_client.chat.completions.create(
    model="gpt-4o",
    messages=messages,
    max_tokens=400
)

Задержки да, адские, около 1 фпс

Согласен, большинство действий автономного вождения не требует скурпулезного анализа и большого компьюта. Скорее более важна скорость реакции. В end-to-end парадигме это умение модели работать в быстром и «решительном» или медленном но «задумчивом» режимах. Как у Канемана - «думай медленно, решай быстро».

Ну и тоже верно, мозгов робота лишать не нужно, в идеале все мозги держать на колесах (особенно если ездить нужно по открытой).

местности)

Information

Rating
Does not participate
Registered
Activity

Specialization

ML разработчик, Инженер по компьютерному зрению
Ведущий
Python
Машинное обучение
Компьютерное зрение