argman / EAST

A tensorflow implementation of EAST text detector
GNU General Public License v3.0
3.02k stars 1.05k forks source link

run "python eval.py" cause "Segmentation fault (core dumped)" randomly. #108

Open neutronest opened 6 years ago

neutronest commented 6 years ago

Hi, when I run eval.py in anaconda-project environment, after the program finished, a "Segmentation fault (core dumped)" may occured randomly .

operation history:

$ docker run -t -i continuumio/anaconda3:5.0.1 /bin/bash
$ /home/dongchao/  apt-get -qq update && apt-get install -y build-essential libglu1-mesa libgtk2.0-0 vim
$/home/dongchao/ git clone https://github.com/argman/EAST.git EAST2 && cd EAST2

Use a prepared anaconda-project.yml to install necessary packages and manage them with anaconda-project

$/home/dongchao cp /home/foobar/anaconda-project.yml ./

Begin to install packages

$/home/dongchao  anaconda-project run --env-spec default
$/home/dongchao source activate envs/default

add import matplotlib.pyplot at first line in eval.py for issue https://github.com/conda-forge/matplotlib-feedstock/issues/144

from matplotlib import pyplot as plt
import cv2
import time
import math
import os
import numpy as np
import tensorflow as tf
(envs/default/) root@xxxxxxx:/home/dongchao/EAST2# python eval.py
make: Entering directory '/home/dongchao/EAST2/lanms'
make: 'adaptor.so' is up to date.
make: Leaving directory '/home/dongchao/EAST2/lanms'
resnet_v1_50/block1 (?, ?, ?, 256)
resnet_v1_50/block2 (?, ?, ?, 512)
resnet_v1_50/block3 (?, ?, ?, 1024)
resnet_v1_50/block4 (?, ?, ?, 2048)
Shape of f_0 (?, ?, ?, 2048)
Shape of f_1 (?, ?, ?, 512)
Shape of f_2 (?, ?, ?, 256)
Shape of f_3 (?, ?, ?, 64)
Shape of h_0 (?, ?, ?, 2048), g_0 (?, ?, ?, 2048)
Shape of h_1 (?, ?, ?, 128), g_1 (?, ?, ?, 128)
Shape of h_2 (?, ?, ?, 64), g_2 (?, ?, ?, 64)
Shape of h_3 (?, ?, ?, 32), g_3 (?, ?, ?, 32)
2018-02-24 06:55:43.093493: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
Restore from /tmp/east_icdar2015_resnet_v1_50_rbox/model.ckpt-49491
Find 1 images
409 text boxes before nms
/tmp/ch4_test_images/images/icdar_1.jpg : net 1725ms, restore 1ms, nms 3ms
[timing] 1.7404711246490479
(envs/default/) root@d66ad945404e:/home/dongchao/EAST2# python eval.py
make: Entering directory '/home/dongchao/EAST2/lanms'
make: 'adaptor.so' is up to date.
make: Leaving directory '/home/dongchao/EAST2/lanms'
resnet_v1_50/block1 (?, ?, ?, 256)
resnet_v1_50/block2 (?, ?, ?, 512)
resnet_v1_50/block3 (?, ?, ?, 1024)
resnet_v1_50/block4 (?, ?, ?, 2048)
Shape of f_0 (?, ?, ?, 2048)
Shape of f_1 (?, ?, ?, 512)
Shape of f_2 (?, ?, ?, 256)
Shape of f_3 (?, ?, ?, 64)
Shape of h_0 (?, ?, ?, 2048), g_0 (?, ?, ?, 2048)
Shape of h_1 (?, ?, ?, 128), g_1 (?, ?, ?, 128)
Shape of h_2 (?, ?, ?, 64), g_2 (?, ?, ?, 64)
Shape of h_3 (?, ?, ?, 32), g_3 (?, ?, ?, 32)
2018-02-24 06:55:49.456489: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
Restore from /tmp/east_icdar2015_resnet_v1_50_rbox/model.ckpt-49491
Find 1 images
414 text boxes before nms
/tmp/ch4_test_images/images/icdar_1.jpg : net 1713ms, restore 1ms, nms 3ms
[timing] 1.7300283908843994
Segmentation fault (core dumped)

with anaconda-project.yml info:

# This is an Anaconda project file.
#
# Here you can describe your project and how to run it.
# Use `anaconda-project run` to run the project.
# The file is in YAML format, please see http://www.yaml.org/start.html for more.
#

#
# Set the 'name' key to name your project
#
name: EAST2
#
# Set the 'icon' key to give your project an icon
#
icon:
#
# Set a one-sentence-or-so 'description' key with project details
#
description:
#
# In the commands section, list your runnable scripts, notebooks, and other code.
# Use `anaconda-project add-command` to add commands.
#
commands: {}

#
# In the variables section, list any environment variables your code depends on.
# Use `anaconda-project add-variable` to add variables.
#
variables: {}
#
# In the services section, list any services that should be
# available before your code runs.
# Use `anaconda-project add-service` to add services.
#
services: {}
#
# In the downloads section, list any URLs to download to local files
# before your code runs.
# Use `anaconda-project add-download` to add downloads.
#
downloads: {}
#
# In the packages section, list any packages that must be installed
# before your code runs.
# Use `anaconda-project add-packages` to add packages.
#
packages: []
#
# In the channels section, list any Conda channel URLs to be searched
# for packages.
#
# For example,
#
# channels:
#    - mychannel
#
channels:
- menpo
- chembl
- conda-forge
- pytorch
#
# In the platforms section, list platforms the project should work on
# Examples: "linux-64", "osx-64", "win-64"
# Use `anaconda-project add-platforms` to add platforms.
#
platforms:
- linux-64
- osx-64
- win-64
#
# You can define multiple, named environment specs.
# Each inherits any global packages or channels,
# but can have its own unique ones also.
# Use `anaconda-project add-env-spec` to add environment specs.
#
env_specs:
  default:
    description: Default environment spec for running commands
    packages:
    - anaconda
    - python=3.5
    - tensorflow
    - numpy
    - scipy
    - pandas
    - scikit-learn
    - matplotlib
    - opencv3
    - shapely
    - easydict
    - google-api-python-client
    - httplib2
    - zip
    - pytorch
    - torchvision
    - python-lmdb
    channels:
    - menpo
    - chembl
    - conda-forge
    - pytorch
    #
    # In the platforms section, list platforms the project should work on
    # Examples: "linux-64", "osx-64", "win-64"
    # Use `anaconda-project add-platforms` to add platforms.
    #
    platforms:
    - linux-64
    - osx-64
    - win-64
rasmusjust91 commented 5 years ago

Was this issue resolved?