How to detect Frequency Sweep Direction when Channel is unknown
See below for a python matched filter implementation. I generate an up-chirp and down-chirp. Then, subsequently I filter this signal by two matched filters, each filter is matched to one signal shape. As you see, there are two very strong peaks in the matched filtering. The reason why there are two peaks instead of (what you expect) slowly growing and falling triangles is that the chirps create an orthogonal basis, i.e. two time-shifted chirps are orthogonal, i.e. the MF output is zero. (The chirps are only orthogonal for infinite-time, which we dont have here, so there is still some small non-zero MF output). 

import scipy

Fs = 10000
t = np.arange(0, 2, 1/Fs)

f = 500*(2-t)

signal = np.sin(2*np.pi*f*t)  # generate an down- and upchirp

f_ax, t_ax, Sxx = scipy.signal.spectrogram(signal, Fs)
plt.figure(figsize=(8,8))

plt.subplot(211)
plt.pcolormesh(t_ax, f_ax, Sxx)

plt.subplot(212)
plt.plot(t, np.real(signal))

chirpDown = signal[:int(Fs)]  # extract both signal shapes from the signal
chirpUp = signal[int(Fs):]

rx = signal + 0*np.random.randn(*signal.shape)

# perform the matched filtering (this means convolving with the time-reversed sequence)
t_c = np.arange(0, 3, 1/Fs)[:-1]
plt.plot(t_c, np.convolve(chirpDown[::-1], rx))
plt.plot(t_c, np.convolve(chirpUp[::-1], rx));




So, in order to detect those peaks, you can select the maximum of the MF output for each symbol duration (in case you are not perfectly synchronized) and compare which MF had higher output. Then, you reset the maximum value and search the next symbol period. Alternatively, you can convolve the filter output with some triangle or Gaussian, to get wider peaks.  For example, you can do the following to get an output similar to your posted figure:

triang = 1-abs(np.arange(-1,1,1/Fs))
# perform the matched filtering
t_c = np.arange(0, 3, 1/Fs)[:-1]
mf1 = np.convolve(chirpDown[::-1], rx)
mf2 = np.convolve(chirpUp[::-1], rx)
plt.plot(t_c, mf1)
plt.plot(t_c, mf2)

plt.figure()
plt.plot(np.convolve(mf1-mf2, triang))